Powershell PS远程处理失败:必须信任计算机进行委派,并且必须将当前用户帐户配置为允许委派。”;

Powershell PS远程处理失败:必须信任计算机进行委派,并且必须将当前用户帐户配置为允许委派。”;,powershell,powershell-2.0,powershell-remoting,Powershell,Powershell 2.0,Powershell Remoting,我在远程计算机上加密/解密时遇到一些问题。例如:当我运行以下命令时,我得到以下错误 有人知道如何解决这个问题吗 [remote machine]: PS C:\> Add-Type -assembly System.Security [remote machine]: PS C:\> $passwordBytes = [System.Text.Encoding]::Unicode.GetBytes("Password!") [remote machine]: PS C:\> $

我在远程计算机上加密/解密时遇到一些问题。例如:当我运行以下命令时,我得到以下错误

有人知道如何解决这个问题吗

[remote machine]: PS C:\> Add-Type -assembly System.Security
[remote machine]: PS C:\> $passwordBytes = [System.Text.Encoding]::Unicode.GetBytes("Password!")
[remote machine]: PS C:\> $entropy = [byte[]](1,2,3,4,5)
[remote machine]: PS C:\> $encrytpedData = [System.Security.Cryptography.ProtectedData]::Protect($passw
ordBytes, $entropy, "CurrentUser")
Exception calling "Protect" with "3" argument(s): "The requested operation cannot be completed. The computer must be tr
usted for delegation and the current user account must be configured to allow delegation.
"
At line:1 char:71
+ $encrytpedData = [System.Security.Cryptography.ProtectedData]::Protect <<<< ($passwordBytes, $entropy, "CurrentUser")
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DotNetMethodException
[远程机器]:PS C:\>添加类型-组装系统。安全性
[远程计算机]:PS C:\>$passwordBytes=[System.Text.Encoding]::Unicode.GetBytes(“密码!”)
[远程机器]:PS C:\>$entropy=[字节[]](1,2,3,4,5)
[远程计算机]:PS C:\>$encrytpedData=[System.Security.Cryptography.ProtectedData]::Protect($passw)
ordBytes,$entropy,“当前用户”)
使用“3”参数调用“Protect”时出现异常:“无法完成请求的操作。计算机必须是tr。”
usted用于委派,当前用户帐户必须配置为允许委派。
"
第1行字符:71
+$encrytpedData=[System.Security.Cryptography.ProtectedData]::Protect您可以在Bruce Payette好书的capter 13中查看

您可能需要CredSSP机制,该机制使您能够通过可信中介将凭据安全地传递给目标计算机