0

So, recently, I asked a question about downloading a file to a variable. My team previously used powershell to download like this:

powershell.exe (new-object System.Net.WebClient).DownloadFile('https://example.org/example.bat', 'example.bat')

However, this question's answer had a new way to download, bitsadmin:

bitsadmin /transfer myDownloadJob /download /priority normal https://example.org/example.bat

Which one should I use? And what pros and cons do they have?

4
  • This pretty much answers your question BITSAdmin is deprecated and is not guaranteed to be available in future versions of Windows. Administrative tools for the BITS service are now provided by BITS PowerShell cmdlets. Commented Sep 23, 2019 at 11:59
  • That said, I think I'd use the bits cmdlets io the WebClient. BITS handles network interuptions, pausing and automatically resuming transfers, even after a reboot. Commented Sep 23, 2019 at 12:02
  • @LievenKeersmaekers Really? I've seen no official documents documenting the issue.
    – user55160
    Commented Sep 23, 2019 at 12:02
  • It is mentioned in the top of the helpmessage when you open a command prompt and enter bitsadmin /? | more (Using a W10 Laptop - bitsadmin version 3.0) Commented Sep 23, 2019 at 12:26

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.