我有一个用 C# 编写的程序,它使用 powershell bitstransfer 从机器上传和下载文件。它一直工作正常,直到今天上传和下载停止工作并给出此错误。似乎该错误是我机器的本地错误,因为其他机器可以正常使用 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