【发布时间】:2011-06-29 14:14:00
【问题描述】:
在执行 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 以查看它是否失败。如果失败,请尝试在提升的 powershell 提示符中本地执行它...
-
嗨,cad,感谢您的输入,但我需要在远程模式下执行。这是一个当前在本地执行中运行良好的脚本。我希望与远程访问相关的问题是这个问题
-
如果它在本地工作并且远程失败,那么您可能会尝试一些东西。假设机器 A 是您要执行的 powershell 脚本和机器 B 的位置。将机器 B 中的管理员权限授予所有机器 A(您可以授予完整机器)
标签: powershell powershell-2.0 powershell-remoting