启用PSRemoting后无法创建远程PowerShell会话

use*_*661 16 powershell remoting

我无法远程进入任何机器来拯救我的生命!我已经尝试了所有可以找到的东西.如果有人可以排除故障或指导我,我会很感激,因为这将是一个添加到我的域名的好工具.

建立:

  1. 域内的客户端机器
  2. 域内或域外的服务器机器 - 虚拟化并用于WSUS Computername:wsustest
  3. 客户服务器物理 - 计算机名:epizzi-pc

脚步:

enable-pssremoting done! on all machines
trustedhosts configured with * or client machine added
Firewalls with public profile off just in case

Enter-PSSession -ComputerName wsustest -Credential wsustest\administrator
Enter-PSSession -ComputerName epizzi-pc -Credential epizzi-pc\administrador
Enter-PSSession : Connecting to remote server epizzi-pc failed with the following error message : WinRM cannot process the request. The following error with errorcode 0x80090311 
occurred 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 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.
At line:1 char:1
+ Enter-PSSession -ComputerName epizzi-pc -Credential epizzi-pc\administrador
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (epizzi-pc:String) [Enter-PSSession], PSRemotingTransportException
    + FullyQualifiedErrorId : CreateRemoteRunspaceFailed

Enter-PSSession -ComputerName wsustest -UseSSL -Credential wsustest\administrator

*Enter-PSSession : Connecting to remote server wsustest failed with the following error message : WinRM cannot complete the operation. Verify that the specified computer name is 
valid, that the computer is accessible over the network, and that a firewall exception for the WinRM service is enabled and allows access from this computer. By default, the WinRM 
firewall exception for public profiles limits access to remote computers within the same local subnet. For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:1
+ Enter-PSSession -ComputerName wsustest -UseSSL -Credential wsustest\administrato ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (wsustest:String) [Enter-PSSession], PSRemotingTransportException
    + FullyQualifiedErrorId : CreateRemoteRunspaceFailed*
ERRORs:

Iso*_*age 11

远程连接到服务器时我收到了同样的问题,并发现此博客文章非常有用 - http://jeffgraves.me/2013/10/14/powershell-remoting/

对于我的具体情况,我做了以下事情:

在本地计算机上

  1. winrm quickconfig(虽然已配置)
  2. winrm s winrm/config/client'@ {TrustedHosts ="myservername.domain"}'

在远程计算机上

  1. enable-psremoting -force
  2. Set-PSSessionConfiguration -ShowSecurityDescriptorUI -Name Microsoft.PowerShell -Force


小智 5

我通过使用完全合格的登录解决了这个问题。我使用了 fqdn\accountname,而不是“netbiosdomain\accountname”,如 get-credential 提示中的 Microsoft.com\myaccount 所示。可能并不适合所有人,但值得一试。


MDM*_*313 1

摆脱-UseSSL。我启用了 PSRemoting,但在使用时遇到了问题。我想我可以稍后再看,但现在没关系。