正确设置Credhell多跳问题的CredSSP

时间:2013-08-21 19:12:43

标签: powershell

我遇到了我正在编写的脚本的双跳问题。现在问题是,当我到达计算机远程的New-PSSession时,我收到以下错误:

Image Link如果太难阅读

enter image description here

以下是在原始服务器上运行的代码:

$password = ConvertTo-SecureString "password" -AsPlainText -Force
$cred= New-Object System.Management.Automation.PSCredential ("domain\admin",     $CApassword)
$sesh = new-pssession -computername "MSSCA" -credential $CAcred -Authentication CredSSP

$sesh变量返回null并抛出上述错误。

执行powershell脚本/远程处理的服务器设置为将新凭据委托给mssca(我DID指定此目标服务器的FQDN),同样mssca设置为接收。

我按照错误消息的说明修改了组策略,在Allow Delegating Fresh Credentials下启用Configuration -> Administrative Templates -> System -> Credentials Delegation -> Allow Delegating Fresh Credentials已设置为mssca的新凭据。

我有什么想法可以解决这个问题吗?

1 个答案:

答案 0 :(得分:2)

想出来。虽然错误消息说使用FQDN,但我的脚本没有使用FQDN。使用“仅NTLM服务器身份验证”选项以及将组策略设置更改为仅mssca而不是FQDN后,它就可以工作。