Good morning, I'm trying to establish a remote connection through powershell on a Windows Server 2012 r2, I already configured the service on the server (WinRM), through the Enable-PSRemoting. But I can not connect from a PC, the following error.
Enter-PSSession -ComputerName GLXCESRVDOM01 -Credential $ CredUser
Enter-PSSession: Error connecting to remote server GLXCESRVDOM01. Error message: The WinRM client can not process the request. If the authentication scheme is different from Kerberos, or if the client computer is not joined to a domain, use the HTTPS transport or add the target computer to the value of TrustedHosts configuration. Use winrm.cmd to set TrustedHosts. Note that you may TrustedHosts teams list is not authenticated. For more information, run the following command: winrm help config. For more information, see the Help topic about_Remote_Troubleshooting. Online: 1 Character: 1 + Enter-PSSession GLXCESRVDOM01 -Credential $ CredUser
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~ +
CategoryInfo: InvalidArgument: (GLXCESRVDOM01: String) [Enter-PSSession], PSRemotingTransportException + FullyQualifiedErrorId: CreateRemoteRunspaceFailed
$ CredUser to use domain credentials as the PC from where you perform the tests is not in the same domain; however from a PC that belongs to the domain if the error is quite similar. I hope can guide a little in this. Thanks.
If the machines aren't in the same domain, and/or if you're not using the remote machines canonical AD name, then you can't use Kerberos. You must enable and explicitly specify Basic, and either set up SSL or use TrustedHosts. I'd recommend "Secrets of PowerShell Remoting" on our eBooks menu as mandatory reading, since the setup can get a little intricate, and there are security implications.
You must be logged in to reply to this topic.