此计算机未配置为允许委派用户凭据,Powershell远程处理 – 策略不允许委派用户凭据...

我是powershell的新手,我在使用凭据授权方面遇到了麻烦。我有以下脚本:

$session = New-PSSession myserver -Authentication CredSSP -Credential DOMAIN\Administrator

Invoke-Command -Session $session -ScriptBlock { }

在运行之前,我做了以下事情:

>在myserver上运行Enable-PSRemoting。

>在myserver上运行Enable-WSManCredSSP Server。

>在myserver上运行Restart-Service WinRM。

>在客户端上运行Enable-WSManCredSSP Client -DelegateComputer myserver。

>重新启动服务器和客户端。

但是一旦我运行脚本,我收到以下错误消息:

[myserver] Connecting to remote server failed with the following error message : The WinRM client cannot process the request. A computer policy does not allow the delegation of

the user credentials to the target computer. Use gpedit.msc and look at the following policy: Computer Configuration -> Administrative Templates -> System -> Credentials Delega

tion -> Allow Delegating Fresh Credentials. Verify that it is enabled and configured with an SPN appropriate for the target computer. For example, for a target computer name "m

yserver.domain.com", the SPN can be one of the following: WSMAN/myserver.domain.com or WSMAN/*.domain.com. For more information, see the about_Remote_Troubleshooting Help topic.

+ CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [], PSRemotingTransportException

+ FullyQualifiedErrorId : PSSessionOpenFailed

我检查了错误消息中提到的策略,但一切似乎都没问题。还有什么可以挡住我?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值