可能是因爲-Asynchr onous標誌要求Complete-BitsTransfer cmdlet才能完成傳輸。
例如。 如果你運行像
Start-BitsTransfer -Asynchronous -Priority High -TransferType Download -Source http://localhost/vdir/validity.txt -Destination C:\
那麼你的代碼,我想你會對你的C一些xxxx.tmp文件:\根。當你的BITS作業的狀態會像
JobId : **3bdb9071-d780-446f-974c-074a48206c0c**
DisplayName : BITS Transfer
TransferType : Download
JobState : **Transferred**
OwnerAccount : blablabla
Priority : High
FilesTransferred : 1
FilesTotal : 1
BytesTransferred : 310764
BytesTotal : 310764
CreationTime : 2/23/2015 3:55:23 PM
ModificationTime : 2/23/2015 3:55:39 PM
MinimumRetryDelay :
NoProgressTimeout :
TransientErrorCount : 0
ProxyUsage : SystemDefault
ProxyList :
ProxyBypassList :
然後,你將需要運行以下命令來獲取xxxx.tmp文件轉換爲validity.txt
$Job = Get-BitsTransfer -JobId "3bdb9071-d780-446f-974c-074a48206c0c"
Complete-BitsTransfer -BitsJob $Job
嘗試'啓動BitsTransfer'與'-Verbose'或'-Debug'參數 – 2015-02-11 09:59:52
使用'-Verbose'或'-Debug'參數 – 2015-02-11 10:00:04