2012-05-01 12 views
3

私はPowerShellビット転送を使用してマシンからファイルをアップロードしてダウンロードするプログラムをC#で作成しています。アップロードとダウンロードがこのエラーを出して動作しなくなった今日まで、うまくいきました。他のマシンがbitstransferで正常に動作し、マシンを再起動しても問題は解決しなかったので、エラーは私のマシンにとってローカルなものです。 誰かが私を助けてくれますか?ありがとうpowershell bitstransferオブジェクト参照がオブジェクトのインスタンスに設定されていません

PS Start-BitsTransfer -Source \\ip\data\filename.xml -Destination G:\\PLAYGROUND\\dir\\\ 
Start-BitsTransfer : Object reference not set to an instance of an object. 
At line:1 char:19 
+ Start-BitsTransfer <<<< -Source \\ip\data\filename.xml -Destination G:\\PLAYGROUND\\dir\\\ 
    + CategoryInfo   : NotSpecified: (:) [Start-BitsTransfer], NullReferenceException 
    + FullyQualifiedErrorId : System.NullReferenceException,Microsoft.BackgroundIntelligentTransfer.Management.NewBits 
    TransferCommand 


    PS Start-BitsTransfer -Source G:\\PLAYGROUND\\dir\\file.txt -Destination \\\\ip\\data\\\ 
Start-BitsTransfer : Object reference not set to an instance of an object. 
At line:1 char:19 
+ Start-BitsTransfer <<<< -Source G:\\PLAYGROUND\\dir\\file.txt -Destination \\\\ip\\data\\\ 
    + CategoryInfo   : NotSpecified: (:) [Start-BitsTransfer], NullReferenceException 
    + FullyQualifiedErrorId : System.NullReferenceException,Microsoft.BackgroundIntelligentTransfer.Management.NewBits 
    TransferCommand 
+0

わかりやすくするために、ソースと宛先のパラメータで '\\'をエスケープする必要はありません。 –

答えて

2

代わりにcopyコマンドを使用して修正しました。

+0

同じ問題、修正なし。ちょうどコピーアイテムを使用しなければならなかった – Brett

関連する問題