Powershell 没有可用的登录服务器

Powershell 没有可用的登录服务器

我有一台部署服务器 A、我的本地计算机 B 和我访问的服务器 C。当我从 B 运行测试脚本到 C 时,它会成功。当我从 A 运行同一个脚本到 C 时,它会失败,我可以 ping 它但不能运行任何其他东西。

测试脚本:

$credential2 = New-Object System.Management.Automation.PsCredential(("Test\ci"), (ConvertTo-SecureString "Password" -AsPlainText -Force))
Test-Connection -ComputerName C

invoke-command -computername C { get-UICulture } -Credential $credential2 

错误信息:

[C] Connecting to remote server failed with the following error message : WinRM cannot process the request. The
 following error occured while using Kerberos authentication: There are currently no logon servers available to service
 the logon request.
 Possible causes are:
  -The user name or password specified are invalid.
  -Kerberos is used when no authentication method and no user name are specified.
  -Kerberos accepts domain user names, but not local user names.
  -The Service Principal Name (SPN) for the remote computer name and port does not exist.
  -The client and remote computers are in different domains and there is no trust between the two domains.
 After checking for the above issues, try the following:
  -Check the Event Viewer for events related to authentication.
  -Change the authentication method; add the destination computer to the WinRM TrustedHosts configuration setting or us
e HTTPS transport.
 Note that computers in the TrustedHosts list might not be authenticated.
   -For more information about WinRM configuration, run the following command: winrm help config. For more information,
 see the about_Remote_Troubleshooting Help topic.
    + CategoryInfo          : OpenError: (:) [], PSRemotingTransportException
    + FullyQualifiedErrorId : PSSessionStateBroken

最后说明: - A,B 在同一个域中,C 是一个工作组 - 启用 PSRemoting(完成) - 修改组策略(完成) - 设置执行策略(完成) - 打开防火墙(完成)

我没什么主意了,有什么猜测或事情需要跟进吗?提前感谢你的帮助。

答案1

看来,最重要的部分是验证我的策略设置。服务器 C(工作组)设置为允许域中的服务器 A、B 进行连接。在某个时候,我使用相同的设置设置了服务器 A。由于 C 在工作组中,A 不信任它。

解决方法是从 A 中删除/更新设置以适应这种情况。

相关内容