powershell remote system 在localhost创建会话链接 失败

**OS:Windows10 Pro
PSVersion:5.1**

以管理员权限启动Standard Powershell,并且将localhost加入了trusthost列表,New-Pssession依然报错。

以下是报错信息:

New-PSSession : [localhost] Connecting to remote server localhost failed with the following error message : WinRM cannot process the request. The following
error with errorcode 0x8009030e occurred while using Negotiate authentication: A specified logon session does not exist. It may already have been
terminated.
 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 use 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.
 Other Possible Cause:
  -The domain or computer name was not included with the specified credential, for example: DOMAIN\UserName or COMPUTER\UserName.
At line:1 char:1
+ New-PSSession
+ ~~~~~~~~~~~~~
    + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotingTransportException
    + FullyQualifiedErrorId : 1312,PSSessionOpenFailed

以下是截图:

图片描述

阅读 2.5k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进