2

I am trying to connect to an Exchange server via a wsman connection using PowerShell. The client server in question is in a Workgroup, while the Exchange server is in its own domain.

I use the following command to try to connect to the server:

connect-wsman -connectionuri http://servername/PowerShell -credential domain\administrator

I then get the full error:

Connecting to remote server failed with the following error message: The WinRM client cannot process the request. It cannot determine the content type of the HTTP response from the destination computer. The content type is absent or invalid. For more information, see the about_Remote_Troubleshooting Help topic.

This worked previously when the client server in question was in the same domain as the Exchange server. Firewalls are off, all servers are TrustedHosts with respect to WinRM.

Interestingly, when I use:

connect-wsman -computername servername -credential domain\administrator

I do not get any errors. However, I need to be able to use the URI instead of the computer name.

Any Ideas?

user2996787
  • 21
  • 1
  • 1
  • 2

2 Answers2

1

I believe you are connecting to the wrong port. There is probably some other service (not wsman) running on port 80, but in your URI, you didn't specify the port, so it assumes port 80

http://servername

Unless you are really using port 80 for wsman on the Exchange server, you should specify the port (example using port 5985):

http://servername:5985

To find out which port you need, you should log into the Exchange server, launch powershell and run this:

Get-WSManInstance -ResourceURI winrm/config/listener -Enumerate

There is a test function you can use from your client side powershell (see http://technet.microsoft.com/en-us/library/hh849873.aspx):

test-wsman http://servername:port  
Joshua Huber
  • 817
  • 6
  • 7
0

I was able to work around the issue by putting my client into the same domain as the target. This was not possible before due to some outside issues, but those were resolved.

user2996787
  • 21
  • 1
  • 1
  • 2