Windows PowerShell
Copyright (C) 2014 Microsoft Corporation. All rights reserved.
PS H:\> $PSVersionTable
Name Value
---- -----
PSVersion 4.0
WSManStackVersion 3.0
SerializationVersion 1.1.0.1
CLRVersion 4.0.30319.34209
BuildVersion 6.3.9600.17400
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion 2.2
Add-PSSnapin : Cannot load Windows PowerShell snap-in
Microsoft.Exchange.Management.PowerShell.E2010 because of the following error: The
type initializer for 'Microsoft.Exchange.Data.Directory.Globals' threw an exception.
At line:1 char:258
+ ... t -eq 0 } | %{ Add-PSSnapin $_ }
+ ~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (Microsoft.Excha...owerShell.E2010:String) [Add-PSSnapin], PSSnapInException
+ FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://<FQDN of Exchange 2010 server>/PowerShell/ -Authentication Kerberos
Import-PSSession $Session
If you can use your current credentials, that is from inside your domain.$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://<FQDN of Exchange 2010 server>/PowerShell/ -Authentication Kerberos
Import-PSSession $Session
All of the Exchange Servers is on 2010 SP3:
HT/CAS: Windows NLB
PRODHTCAS01-VM
PRODHTCAS02-VM
Mailbox: No DAG just stand alone servers.
PRODMBX01-VM
PRODMBX02-VM
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://outlook.domain.com/PowerShell/ -Authentication Kerberos
Import-PSSession $Session
Get-ExchangeDiagnosticInfo
New-PSSession : [outlook.domain.com] Connecting to remote server outlook.domain.com failed with the following error message : WinRM cannot process the request. The following
error occurred while using Kerberos authentication: The computer outlook.domain.com is unknown to Kerberos. Verify that the computer exists on the network, that the name
provided is spelled correctly, and that the Kerberos configuration for accessing the computer is correct. The most common Kerberos configuration issue is that an SPN with the
format HTTP/outlook.domain.com is not configured for the target. If Kerberos is not required, specify the Negotiate authentication mechanism and resubmit the operation. For
more information, see the about_Remote_Troubleshooting Help topic.
At C:\Users\Admin\AppData\Local\Temp\fd f89f0b-89e d-4ae2-944 3-f0532857 151e.ps1:2 char:12
+ $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri ht ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ~~~~
+ CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:R emoteRunsp ace) [New-PSSession], PSRemotingTransportExcepti on
+ FullyQualifiedErrorId : NetworkPathNotFound,PSSessionOpenFai led
Import-PSSession : Cannot validate argument on parameter 'Session'. The argument is null. Provide a valid value for the argument, and then try running the command again.
At C:\Users\Admin\AppData\Local\Temp\fd f89f0b-89e d-4ae2-944 3-f0532857 151e.ps1:3 char:18
+ Import-PSSession $Session
+ ~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Import-PSSession], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Mic rosoft.Pow erShell.Co mmands.Imp ortPSSessi onCommand
Looks like direct loading of Ex2010 EMS is not supported with 4.0. You may have to establish a remote session to server. Following article has more information on establishing remote session.
https://technet.microsoft.com/en-us/library/dd297932(v=exchg.141).aspx
Following is the discussion on TechNet regarding this.
https://social.technet.microsoft.com/Forums/exchange/en-US/d45f0808-b5fb-469d-8a39-60d1d160c1a0/exchange-2010-pssnapin-exception