远程执行时 PowerShell 脚本失败

标签 powershell powershell-2.0 powershell-remoting

在执行 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/

相关文章:

powershell - 读取后如何清除文件内容

powershell - 使用 Kudu Rest API 将文件上传到 Azure Web App - 409 错误

.net - 自动部署到 F5 负载平衡环境

PowerShell、Web 请求和代理

powershell - 使用 Powershell 中文本文件中的字符串过滤 gci 的结果

Powershell远程启用

PowerShell:模块、它们的位置和重新加载

windows - 我需要一个 powershell 脚本来监控正在运行的 Windows 计划任务超过 X 分钟

windows - PowerShell Direct与WinRM或PowerShell Remoting有何不同

Powershell 2.0 远程加载 .Net 4.0 dll