Sign in with Microsoft
Sign in or create an account.
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.


Consider the following scenario:

  • You deploy different cumulative updates for Microsoft Exchange servers in an Exchange Server 2013 environment.

  • You configure a load balancer that doesn't use session affinity for HTTP and a namespace for PowerShell.

  • You use the following Exchange Management Shell to create remote PowerShell sessions across the load balancer:

    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -AllowRedirection
    Import-PSSession $Session

In this scenario, the connection isn't successful. Additionally, you receive a WSMan-InvalidShellID error that resembles the following:

New-PSSession : [] Processing data from remote server failed with the following error message: [ClientAccessServer=Server1,, RequestId=IDNumber, TimeStamp=Date/Time] [FailureCategory=WSMan-InvalidShellID] The request for the Windows Remote Shell with ShellId ShellIDNumner failed because the shell was not found on the server.Possible causes are: the specified ShellId is incorrect or the shell no longer exists on the server. Provide the correct ShellId or create a new shell and retry the operation. For more information, see the bout_Remote_Troubleshooting Help topic.


This issue occurs because the remote PowerShell sessions aren't routed constantly to the same Mailbox server.


To work around this issue, use one of the following methods:

  • Configure the load balancer to use session affinity or persistence.

  • Have the Exchange servers use the same cumulative update build in load balancing.


To fix this issue, install Cumulative Update 11 or a later cumulative update for Exchange Server 2013.


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!