在执行 PowerShell 远程脚本时,出现如下错误
Invoke-Command : Exception calling "ToXmlString" with "1" argument(s): "The requested operation cannot be completed. Th
e computer must be trusted for delegation and the current user account must be configured to allow delegation.
执行中断的确切代码行如下:
$rsa = New-Object System.Security.Cryptography.RSACryptoServiceProvider
$key = $rsa.ToXmlString($true)
谁能帮我解决这个问题??
最佳答案
看起来就像错误所说的那样,您需要被信任才能进行委派。我在网上找到了这些链接。
关于远程执行时 PowerShell 脚本失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6522098/