gpt4 book ai didi

powershell - 针对 powershell 多跳问题正确设置 CredSSP

转载 作者:行者123 更新时间:2023-12-02 23:46:55 24 4
gpt4 key购买 nike

我在编写脚本时遇到了双跳问题。现在的问题是当我到达 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 脚本/远程处理的服务器设置为将新凭据委托(delegate)给 mssca(我指定了此目标服务器的 FQDN),同样 mssca 设置为接收。

我按照错误提示修改组策略,启用 Allow Delegating Fresh CredentialsConfiguration -> Administrative Templates -> System -> Credentials Delegation -> Allow Delegating Fresh Credentials 下已设置为将新凭据委托(delegate)给 mssca .

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

最佳答案

弄清楚了。虽然错误消息说使用 FQDN,但我的脚本没有使用 FQDN。在使用“仅 NTLM 服务器身份验证”选项以及将组策略设置更改为仅 mssca 之后而不是 FQDN,它起作用了。

关于powershell - 针对 powershell 多跳问题正确设置 CredSSP,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18365739/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com