Help! Remote Powershell not working anymore since Exchange 2010 SP2

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
With the below code I did successful powershell queries against my Exchange 2010 server for many weeks now. Last night the Ex2010 Service Pack 2 was installed and since then it does not work anymore.
See the exception below. It looks to me that the SP changed something with security and remote access. I have already tried several combinations of wsman Authentication method and parameters, but only got some -different- error messages.
Also tried search the forum and Googling, but no luck, there are some comments out there, but seems a lot about guessing and assumptions or different scenarios.
The code needs to run remotely, both computers are members in same domain, and the code shall use the security credentials of the user account of which it is running on. The user account has full administrative privileges on both the local and the Exchange
computer.

Any idea and sample code how to solve that, would be highly welcome!

Many thanks!
Klaus

<pre class="prettyprint lang-vb" style=" Dim SHELL_URI As String = "http://schemas.microsoft.com/powershell/Microsoft.Exchange"

Dim serverUri As System.Uri = New Uri(String.Format("https://" & server & "/powershell"))
Dim creds As PSCredential = DirectCast(Nothing, PSCredential)
Dim wsManInfo As WSManConnectionInfo = New WSManConnectionInfo(serverUri, SHELL_URI, creds)
wsManInfo.AuthenticationMechanism = AuthenticationMechanism.NegotiateWithImplicitCredential
wsManInfo.SkipCACheck = True
wsManInfo.SkipCNCheck = True
wsManInfo.NoEncryption = False
wsManInfo.MaximumConnectionRedirectionCount = 4

myRunSpace = RunspaceFactory.CreateRunspace(wsManInfo)

myRunSpace.Open()[/code]

Exception:
<pre class="prettyprint lang-vb" style=" Connecting to remote server failed with the following error message : The WinRM <br/>client cannot process the request. The authentication mechanism requested by <br/>the client is not supported by the server or unencrypted traffic is disabled <br/>in the service configuration. Verify the unencrypted traffic setting in the <br/>service configuration or specify one of the authentication mechanisms supported <br/>by the server. To use Kerberos, specify the computer name as the remote <br/>destination. Also verify that the client computer and the destination <br/>computer are joined to a domain. To use Basic, specify the computer name <br/>as the remote destination, specify Basic authentication and provide user name <br/>and password. Possible authentication mechanisms reported by server: For more <br/>information, see the about_Remote_Troubleshooting Help topic. at System.Management.Automation.Runspaces.AsyncResult.EndInvoke()<br/>at System.Management.Automation.Runspaces.Internal.RunspacePoolInternal.EndOpen(IAsyncResult asyncResult)<br/>at System.Management.Automation.Runspaces.Internal.RemoteRunspacePoolInternal.Open()<br/>at System.Management.Automation.Runspaces.RunspacePool.Open()<br/>at System.Management.Automation.RemoteRunspace.Open()<br/>at MBStats5.Module1.OpenRunspace(String server) [/code]
<br/>


<br/>
<br/>
<br/>

View the full article
 
Back
Top