Powershell – how to connect to server in remote domain with winrm

powershellwinrm

I have winrm enabled on a remote server and from a member of that server's domain, I am able to run Powershell commands using PSSession. However, from a client in another domain, I get "Connecting to remote server … failed with the following error message : The connection to the specified remote host was refused.
+ CategoryInfo : OpenError: (server FQDN:String) [], PSRemotingTransportException"

I did put the remote server into my client's TrustedHosts list. Here's an example command:

icm -comp ServerFQDN {dir} -cred domainShortName\MyUserID

Can anyone tell me what I need to do to make this work?

Best Answer

The client in another domain must management rights. Check this link: Configure Windows Remote Powershell Access

You may also to try to enable PSRemoting, if not enabled.

Enable-PSRemoting -Force

Take a look at this link: Enable Powershell Remoting and WinRM