I am using Powershell 2.0 on Windows 2008 and 2008 R2 and Win7 boxes. I have two domains, A and B, domain B trusts A, but A does NOT trust B. I have a computer on domain A running a Powershell scripts that I would like to be remotely run on servers in domain B. I have enabled WinRM on all boxes, verified the firewall settings, added the WinRM host exceptions on each box back to the other, and am still unable to execute any commands from A on B.
winrm quickconfig
winrm set winrm/config/client @{TrustedHosts="computername"}.
The error I am still getting when going from A to B is (if I go B to A it works!?):
PS H:\> invoke-command computer { 'hello' }
[computer] Connecting to remote server failed with the following error message : WinRM cannot process the request.
The following error occured while using Kerberos authentication: The network path was not found.
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
What am I missing, if anything?