Applies to: Exchange Server 2010 SP3, Exchange Server 2010 SP2

Topic Last Modified: 2012-07-23

While using the remote Exchange Management Shell with Microsoft Exchange Server 2010, you may encounter problems. You can use the information in this topic to diagnose and resolve client and connection issues.

This topic addresses problems with the Shell that administrators of on-premises installations of Exchange 2010 might encounter. If you're troubleshooting problems with the remote Shell for your Microsoft Office Outlook Web App organization, see Windows PowerShell: FAQ for Administrators.

Client Issues

The following sections describe techniques for resolving client issues that you may encounter.

Script Execution Error Caused by Windows PowerShell Execution Policy

You might get the following error message when you attempt to open the Shell using the instructions in the topic Open the Shell. The error is caused by setting the script execution policy in Windows PowerShell to Restricted or AllSigned. To resolve this issue, you need to set the script execution policy to RemoteSigned. For more information, see Install Windows Management Framework.

Copy Code
File D:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1 cann
ot be loaded because the execution of scripts is disabled on this system. Pleas
e see "get-help about_signing" for more details.
At line:1 char:2
+ . <<<<  'D:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps
1'; Connect-ExchangeServer -auto
	+ CategoryInfo		: NotSpecified: (:) [], PSSecurityException
	+ FullyQualifiedErrorId : RuntimeException

The term 'Connect-ExchangeServer' is not recognized as the name of a cmdlet, fu
nction, script file, or operable program. Check the spelling of the name, or if
 a path was included, verify that the path is correct and try again.
At line:1 char:98
+ . 'D:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1'; Co
nnect-ExchangeServer <<<<  -auto
	+ CategoryInfo		: ObjectNotFound: (Connect-ExchangeServer:String)
   [], CommandNotFoundException
	+ FullyQualifiedErrorId : CommandNotFoundException

Import-PSSession Error Caused by Windows PowerShell Execution Policy

You might get the following error message when you attempt to use the remote Shell to connect to a remote Exchange 2010 server using the instructions in the topic Connect Remote Exchange Management Shell to an Exchange Server. The error is caused by setting the script execution policy in Windows PowerShell to Restricted or AllSigned. To resolve this issue, you need to set the script execution policy to RemoteSigned. For more information, see Install Windows Management Framework.

Copy Code
Import-Module : There were errors in loading the format data file:
Microsoft.PowerShell, , D:\Users\Administrator\AppData\Local\Temp\1\tmp_88ee1dec-ed9c-4b0c-bc3d-68ca394f6d0f_4ilp43pe.x
vh\tmp_88ee1dec-ed9c-4b0c-bc3d-68ca394f6d0f_4ilp43pe.xvh.format.ps1xml : File skipped because of the following validati
on exception: File D:\Users\Administrator\AppData\Local\Temp\1\tmp_88ee1dec-ed9c-4b0c-bc3d-68ca394f6d0f_4ilp43pe.xvh\tm
p_88ee1dec-ed9c-4b0c-bc3d-68ca394f6d0f_4ilp43pe.xvh.format.ps1xml cannot be loaded because the execution of scripts is
disabled on this system. Please see "get-help about_signing" for more details..
At line:3 char:30
+				 Import-Module <<<<  -Name $name -Alias * -Function * -Prefix $prefix -DisableNameChecking:$disableNam
eChecking -PassThru -ArgumentList @($session)
	+ CategoryInfo		: InvalidOperation: (:) [Import-Module], RuntimeException
	+ FullyQualifiedErrorId : FormatXmlUpateException,Microsoft.PowerShell.Commands.ImportModuleCommand

Error When the ForEach Cmdlet Is Used in a Pipeline and Cmdlets Are Used in its Script Block

You might get the following error message when you use the ForEach cmdlet in a pipeline and the following circumstances are true:

  • The ForEach cmdlet accepts data from a cmdlet earlier in the pipeline.

  • The script block on the ForEach cmdlet contains a cmdlet.

This error is caused because the Windows PowerShell remoting feature doesn't support more than one pipeline running at the same time. To resolve this issue, store the output of the cmdlet earlier in the pipeline in a variable, and then pipe the data stored in the variable to the ForEach cmdlet. This example results in a concurrent pipeline error.

Copy Code
Get-Mailbox | ForEach { Set-Mailbox -ProhibitSendReceiveQuota 3GB }

The following error message is generated.

Copy Code
Pipeline not executed because a pipeline is already executing. Pipelines cannot be executed concurrently.
	+ CategoryInfo		: OperationStopped: (Microsoft.Power...tHelperRunspace:ExecutionCmdletHelperRunspace) [],
   PSInvalidOperationException
	+ FullyQualifiedErrorId : RemotePipelineExecutionFailed

To resolve the error, store the output of the Get-Mailbox cmdlet in a variable, and then pipe the variable to the ForEach cmdlet, as shown in this example.

Copy Code
$Mailboxes = Get-Mailbox
$Mailboxes | ForEach { Set-Mailbox -ProhibitSendReceiveQuota 3GB }

Incorrect Version of Windows PowerShell Installed

You might get the following error messages if you don't have the correct version of Windows PowerShell installed. You must have Windows PowerShell 2.0, available in Windows Management Framework, to connect to a remote Exchange 2010 server. For more information, see Install Windows Management Framework.

You might receive the following error message if you have Windows PowerShell 1.0 installed.

Copy Code
The term 'New-PSSession' is not recognized as a cmdlet, function, operable program, or script file. Verify the term and
 try again.
At line:1 char:25
+ $Session = New-PSSession  <<<< -ConfigurationName Microsoft.Exchange -ConnectionUri http://ExchangeSrv01
/PowerShell/ -Authentication Kerberos

You might receive the following error messages if you have a pre-release version of Windows PowerShell 2.0 installed.

Copy Code
New-PSSession : Cannot bind parameter 'Authentication'. Cannot convert value "Kerberos" to type "System.Management.Auto
mation.Runspaces.AuthenticationMechanism" due to invalid enumeration values. Specify one of the following enumeration v
alues and try again. The possible enumeration values are "Default, Basic, Negotiate, NegotiateWithImplicitCredential, C
redssp".
At line:1 char:125
+ $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://4367r10-b36/PowerShell/ -Authent
ication <<<<  Kerberos
	+ CategoryInfo		: InvalidArgument: (:) [New-PSSession], ParameterBindingException
	+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.NewPSSessionCommand

Or

Copy Code
The term 'New-PSSessionOption' is not recognized as a cmdlet, function, operable program, or script file. Verify the te
rm and try again.
At D:\Program Files\Microsoft\Exchange Server\V14\bin\ConnectFunctions.ps1:220 char:27
+	 $so = New-PSSessionOption <<<<  -OperationTimeout $sessionOptionsTimeout -IdleTimeout $sessionOptionsTimeout -Ope
nTimeout $sessionOptionsTimeout;
	+ CategoryInfo		: ObjectNotFound: (New-PSSessionOption:String) [], CommandNotFoundException
	+ FullyQualifiedErrorId : CommandNotFoundException

New-PSSession : [4367r10-b36.dvktun-dom.extest.microsoft.com] Processing data from remote server failed with the follow
ing error message: The Windows Remote Shell cannot process the request; the selector value 098316FC-FBE5-4D17-B992-6530
AF1CF7F3 specified in the request was not found.
At D:\Program Files\Microsoft\Exchange Server\V14\bin\ConnectFunctions.ps1:229 char:28
+			 $session = new-pssession <<<<  -connectionURI "http://$fqdn/powershell?serializationLevel=Full" -Configur
ationName Microsoft.Exchange -SessionOption $so #-erroraction silentlycontinue
	+ CategoryInfo		: OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
   gTransportException
	+ FullyQualifiedErrorId : RemoteRunspaceOpenFailed

Connection Issues

The following sections describe techniques for resolving connection issues that you may encounter.

Incorrect User Name or Password

You can receive the following error message if you specify an incorrect user name or password. Verify that the user name and password you're using are correct.

Copy Code
New-PSSession : [ExchServer] Connecting to remote server failed with the following error message : Access is denied.
At line:1 char:19
+ $Session = New-PSSession <<<<  -ConfigurationName Microsoft.Exchange -ConnectionUri https://ExchServer/powershell/ -Credential
$c -SessionOption $SkipCertificate
	+ CategoryInfo		: OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
   gTransportException
	+ FullyQualifiedErrorId : RemoteRunspaceOpenFailed

User Isn't Enabled for Remote Shell

You can receive the following error message if a user tries to connect to a remote Exchange 2010 server and the remote Shell isn't enabled. For more information about how to enable users for the remote Shell, see Enable Remote Exchange Management Shell for a User.

Copy Code
[ExchServer] 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 a
bsent or invalid. For more information, see the about_Remote_Troubleshooting Help topic.
	+ CategoryInfo		: OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [], PSRemotingTransportExc
   eption
	+ FullyQualifiedErrorId : PSSessionOpenFailed

Server Name Provided Doesn't Exist

You can receive the following error message if the server name you specified in the remote Shell URL doesn't exist. To resolve this issue, verify the server name. For more information, see Connect Remote Exchange Management Shell to an Exchange Server.

Copy Code
[exchserver01] 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: (System.Manageme....RemoteRunspace:RemoteRunspace) [], PSRemotingTransportExc
   eption
	+ FullyQualifiedErrorId : PSSessionOpenFailed 

Incorrect Virtual Directory Name

You can receive the following error message if you specify the wrong virtual directory when connecting to a remote Exchange 2010 server. To resolve this issue, verify the virtual directory name. For more information, see Connect Remote Exchange Management Shell to an Exchange Server.

Copy Code
[ExchServer] Connecting to remote server failed with the following error message : The WinRM client received an HTTP st
atus code of 403 from the remote WS-Management service. For more information, see the about_Remote_Troubleshooting Help
 topic.
	+ CategoryInfo		: OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [], PSRemotingTransportExc
   eption
	+ FullyQualifiedErrorId : PSSessionOpenFailed

Warning When the Import-PSSession Cmdlet Is Run

When you connect to a remote Exchange 2010 server using the procedure provided in the Connect Remote Exchange Management Shell to an Exchange Server topic, it's normal to see the following warning after you import the Exchange 2010 cmdlets into your local client.

Copy Code
WARNING: Some imported command names include unapproved verbs which might make them less discoverable.  Use the Verbose
 parameter for more detail or type Get-Verb to see the list of approved verbs.

HTTPS Used When Connecting to a Remote Server

You might receive an error message when connecting to a remote Exchange 2010 server if you use the HTTPS protocol. This error occurs because your computer doesn't trust the certification authority (CA) used to sign the Secure Sockets Layer (SSL) certificate used by the remote server. To connect to a remote Exchange 2010 server, you must use the HTTP protocol and the Kerberos authentication method. For more information, see Connect Remote Exchange Management Shell to an Exchange Server.

Copy Code
[ExchServer] Connecting to remote server failed with the following error message : The server certificate on the destin
ation computer (ExchServer:443) has the following errors:
The SSL certificate is signed by an unknown certificate authority. For more information, see the about_Remote_Troublesh
ooting Help topic.
	+ CategoryInfo		: OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [], PSRemotingTransportExc
   eption
	+ FullyQualifiedErrorId : PSSessionOpenFailed

Incorrect Connection Name When Connecting to a Remote Server

You might receive the following error message if you specify an incorrect value for the ConnectionName parameter when connecting to a remote Exchange 2010 server. You must use the value Microsoft.Exchange with the ConnectionName parameter. For more information, see Connect Remote Exchange Management Shell to an Exchange Server.

Copy Code
[ExchServer] Connecting to remote server failed with the following error message : The WS-Management service cannot pro
cess the request. The resource URI (http://schemas.microsoft.com/powershell/MS.Exch) was not found in the WS-Management
 catalog. The catalog contains the metadata that describes resources, or logical endpoints. For more information, see t
he about_Remote_Troubleshooting Help topic.
	+ CategoryInfo		: OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [], PSRemotingTransportExc
   eption
	+ FullyQualifiedErrorId : PSSessionOpenFailed

Incorrect Authentication Used When Connecting to a Remote Server

You might receive one of the following error messages when connecting to a remote Exchange 2010 server if you specify an authentication method other than Kerberos. To connect to a remote Exchange 2010 server, you must use Kerberos authentication and the HTTP protocol. For more information, see Connect Remote Exchange Management Shell to an Exchange Server.

Copy Code
[ExchServer] Connecting to remote server failed with the following error message : The WinRM client cannot process the
request. CredSSP authentication is currently disabled in the client configuration. Change the client configuration and
try the request again. CredSSP authentication must also be enabled in the server configuration. Also, Group Policy must
 be edited to allow credential delegation to the target computer. Use gpedit.msc and look at the following policy: Comp
uter Configuration -> Administrative Templates -> System -> Credentials Delegation -> Allow Delegating Fresh Credential
s.  Verify that it is enabled and configured with an SPN appropriate for the target computer. For example, for a target
 computer name "myserver.domain.com", the SPN can be one of the following: WSMAN/myserver.domain.com or WSMAN/*.domain.
com For more information, see the about_Remote_Troubleshooting Help topic.
	+ CategoryInfo		: OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [], PSRemotingTransportExc
   eption
	+ FullyQualifiedErrorId : PSSessionOpenFailed

Or

Copy Code
[ExchServer] Connecting to remote server failed with the following error message : The WinRM client cannot process the
request. Default credentials can be used only with Kerberos authentication or Negotiate authentication under HTTPS if t
he Allow implicit credentials for Negotiate is specified. Explicit credentials must be provided if any other authentica
tion scheme is specified. For more information, see the about_Remote_Troubleshooting Help topic.
	+ CategoryInfo		: OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [], PSRemotingTransportExc
   eption
	+ FullyQualifiedErrorId : PSSessionOpenFailed

Or

Copy Code
[ExchServer] Connecting to remote server failed with the following error message : The WinRM client cannot process the
request. If the authentication scheme is different from Kerberos, or if the client computer is not joined to a domain,
then HTTPS transport must be used or the destination machine must be added to the TrustedHosts configuration setting. U
se winrm.cmd to configure TrustedHosts. Note that computers in the TrustedHosts list might not be authenticated. You ca
n get more information about that by running the following command: winrm help config. For more information, see the ab
out_Remote_Troubleshooting Help topic.
	+ CategoryInfo		: OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [], PSRemotingTransportExc
   eption
	+ FullyQualifiedErrorId : PSSessionOpenFailed

Or

Copy Code
[ExchServer] Connecting to remote server failed with the following error message : The WinRM client cannot process the
request. Unencrypted traffic is currently disabled in the client configuration. Change the client configuration and try
 the request again. For more information, see the about_Remote_Troubleshooting Help topic.
	+ CategoryInfo		: OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [], PSRemotingTransportExc
   eption
	+ FullyQualifiedErrorId : PSSessionOpenFailed

Or

Copy Code
[ExchServer] Connecting to remote server failed with the following error message : The WinRM client cannot process the
request. Unencrypted traffic is currently disabled in the client configuration. Change the client configuration and try
 the request again. For more information, see the about_Remote_Troubleshooting Help topic.
	+ CategoryInfo		: OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [], PSRemotingTransportExc
   eption
	+ FullyQualifiedErrorId : PSSessionOpenFailed