The WinRM Shell Client Cannot Process the Request

There are probably many different reasons why this particular PowerShell error can occur on an Exchange server, but this is what happened in my specific case.

The problem was that when I opened the Exchange management shell on one of my two Exchange 2013 test servers it would fail to connect to the local server, and would instead connect to the other server.

The PowerShell window displayed this error.

exchange-2013-ssl-powershell-00

VERBOSE: Connecting to E15MB2.exchange2013demo.com.
New-PSSession : [e15mb2.exchange2013demo.com] Processing data from remote server e15mb2.exchange2013demo.com failed
with the following error message: The WinRM Shell client cannot process the request. The shell handle passed to the WSMan Shell function is not valid. The shell handle is valid only when WSManCreateShell function completes successfully. Change the request including a valid shell handle and try again. For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:1
+ New-PSSession -ConnectionURI “$connectionUri” -ConfigurationName Microsoft.Excha …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (System.Manageme….RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotingTransportException
+ FullyQualifiedErrorId : -2144108212,PSSessionOpenFailed

The cause of this error in my specific case was that the SSL certificate was no longer bound to the Exchange Back End website on that Exchange 2013 server.

exchange-2013-ssl-powershell-01

To fix this, in IIS Manager right-click the Exchange Back End website and click Bindings.

exchange-2013-ssl-powershell-02

Highlight https and click Edit.

exchange-2013-ssl-powershell-03

If you see “Not selected” like I did, click on Select.

exchange-2013-ssl-powershell-04

Choose the certificate you want to bind to the site.

exchange-2013-ssl-powershell-05

Apply the changes and retry the Exchange management shell. If it connects successfully to the server then you have most likely resolved this issue.

exchange-2013-ssl-powershell-06

About Paul Cunningham

Paul is a Microsoft Exchange Server MVP and publisher of Exchange Server Pro. He also holds several Microsoft certifications including for Exchange Server 2007, 2010 and 2013. Connect with Paul on Twitter and Google+.

Comments

  1. Very very very thanks !!!
    This solved my problem !

    Thanks a lot.

    Petr Kallen
    CZECH REPUBLIC

  2. Daoud Ghannam says:

    Thanks , this helped me :)

  3. Chris Brown says:

    Thanks…had this twice now, both times after replacing the IIS cert in Exchange through PowerShell. Confirmed bug?

  4. fparis says:

    Thanks !!!!!

  5. I am seeing similar issue on one of my Exchange 2010 SP3 on W2K12. I cannot use this solution. Do you have another solution to fix this?

    Thanks,
    pallavi

  6. Abdelhaleem says:

    i was have the same issue and its fix by following your steps thanks alo :)

  7. Francis says:

    Hi

    I had the same problem and with the help of your post, i solved it.

    In my case, i had two exchange servers running as VMs with all roles installed. My second VM was created cloning the first before exchange installed. Without knowing this , i installed my second exchange server in the new VM. it went fine. but i had problems executing shell commands and EAC actions (connecting to ex01 and tried creating MDBs in ex02, got Access denied error) from the first exchange server.

    Then i came to know about the cloning, so i ran “sysprep” in the second machine and did other network configs and started the server. All exchange services started fine, but i was unable to connect to ecp, powershell, and owa.

    I verified the “binding” setting and it was also correct. then i read somewhere in the internet that the self signed certificate might havebeen corrupted. so i created a new self signed certificate for ex02 server from the first exchange server. Then i installed the certificate in the trusted root of the second server and selected the new certificate in the “Binding” setting. it worked well.

    Thought of sharing this.

    Thanks
    Francis.

Leave a Comment

*

We are an Authorized DigiCert™ SSL Partner.
Loading...

Still running Exchange 2003? Time to get moving and start your upgrade. Find out how - Click Here