开发者

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

开发者 https://www.devze.com 2022-12-09 15:38 出处:网络
I\'ve found some pages in Google regarding this, but they are either not comp开发者_StackOverflow社区lete or outdated. Is there a definite guide somewhere? ThanksThere is always the help within PowerS

I've found some pages in Google regarding this, but they are either not comp开发者_StackOverflow社区lete or outdated. Is there a definite guide somewhere? Thanks


There is always the help within 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.

You can then call Get-Help on those. The help entries are pretty helpful, from what I've seen. And don't forget Get-Help ... -Examples for detailed and annotated usage examples. And the cmdlets are named self-explanatory, already.


You can try the BITS file transfer Powerpack in case you need some kind of GUI around those BITS Cmdlets.

http://powergui.org/entry.jspa?externalID=2583&categoryID=21


Another option is to look into the JAMS Job Scheduler PowerShell cmdlets for File transfers. It makes it simple to manage transfers across different platforms.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号