Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8607767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:26:30+00:00 2026-06-12T03:26:30+00:00

I have a powershell script where I perform a upload then I must do

  • 0

I have a powershell script where I perform a upload then I must do a RESTful request about the file I just uploaded. Right now it works great as a non-asynchronous method

Start-BitsTransfer -Source $fullPath -Destination "https://www.example.com/bitsupload/$Guid.$SourceFile" -Credential $Credential -TransferType Upload

$web = New-Object Net.WebClient
$web.DownloadString("https://www.example.com/newbitspost/?filename=$Guid.$SourceFile&filedescription=$Description&Friendlyname=$SourceFile")

However I would like to run this in the background so the end user can close the window (more importantly, and my final goal, logoff) and it will still be transferring.

I know I can add -Asynchronous to my Start-BitsTransfer but I can not figure out how to get that GET request performed after the transfer completes.


Thanks to the false positive Duplicate question link (The other question’s answer never actually solves the problem it just shows how to manually execute something afterwards) My question boils down to: How do I duplicate the functionality of /SetNotifyCmdLine from the deprecated BitsAdmin program.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T03:26:32+00:00Added an answer on June 12, 2026 at 3:26 am

    The answer is: You can’t.

    At least not using the BITS cmdlets / BitsTransfer module in PowerShell v2. Your only choice would be to use deprecated functionality, or roll a custom solution interfacing with the BITS API. There is a project called SharpBITS.NET that might be helpful.

    Some more details on what you are hoping to accomplish might help others provide alternatives as well. I am also curious as to what alternatives you have considered – like can you do your RESTful GET before uploading the file? or even as part of the upload perhaps – embed parameters in the query string? I would also consider what it means to do the upload in the background without the user being logged in – or another user logged in, or what happens if they shutdown the computer (or otherwise interrupt the transfer). It might make more sense to have a login script check the status of the BITS transfer jobs and take action at that time for example. For the case where they don’t logoff, you can also hide the window and periodically poll the BITS jobs to check for completion.

    I know these aren’t ideal – and maybe not even worth receiving the accepted answer. I do hope they help though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a powershell script which imports data from a csv file, and then
How do I have a PowerShell script embedded within the same file as a
I have a Batch file which will call a Powershell Script : BATCH FILE
We have a powershell script that creates a local html file and the owner
I have a powershell script that is replacing patterns in a file with the
I have a MSBuild script that starts PowerShell to perform some work on remote
I have a Powershell script file called ExecutBizTalkAppMSI.ps1 This contains a single function called
Today I have just thrown together this PowerShell script which takes a tab-delimited text
I have a powershell script file with PowerCLI commands like Connect-VIServer etc. I am
I have a powershell script below which takes a config file and deletes files

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.