How to use BITS in Powershell to upload / download files?

I found some pages on Google regarding this, but they are either incomplete or outdated. Is there a specific guide somewhere? Thanks

+3
source share
3 answers

There is always help in PowerShell:

PS> import-module bitstransfer
PS> gcm *bits* | ? {$_.Commandtype -eq "cmdlet"}

CommandType Name                  Definition
----------- ----                  ----------
Cmdlet      Add-BitsFile          Add-BitsFile [-BitsJob] <BitsJob[]> [-S...
Cmdlet      Complete-BitsTransfer Complete-BitsTransfer [-BitsJob] <BitsJ...
Cmdlet      Get-BitsTransfer      Get-BitsTransfer [[-Name] <String[]>] [...
Cmdlet      Remove-BitsTransfer   Remove-BitsTransfer [-BitsJob] <BitsJob...
Cmdlet      Resume-BitsTransfer   Resume-BitsTransfer [-BitsJob] <BitsJob...
Cmdlet      Set-BitsTransfer      Set-BitsTransfer [-BitsJob] <BitsJob[]>...
Cmdlet      Start-BitsTransfer    Start-BitsTransfer [-Source] <String[]>...
Cmdlet      Suspend-BitsTransfer  Suspend-BitsTransfer [-BitsJob] <BitsJo...

tells you the commands that are available.

Then you can call Get-Help. Help entries are very useful from what I saw. And don't forget Get-Help ... -Examplesfor detailed and annotated use cases. And the cmdlets are called self-evident, already.

+6
source

Another option is to view the PowerShell cmdlets for the JAMS job scheduler to transfer files. This simplifies gear management across platforms.

0
source

Source: https://habr.com/ru/post/1720687/


All Articles