Author Posts

January 1, 2012 at 12:00 am

by Rob25 at 2012-08-22 00:46:10

Hi,

I am trying to add the Exchange 2010 PS Snapin but I keep getting the following error:

PS C:\Program Files> add-pssnapin Microsoft.Exchange.Management.PowerShell.E2010

Add-PSSnapin : Windows PowerShell snap-in "Microsoft.Exchange.Management.PowerShell.E2010" is loaded with the following warnings: The following errors occurred when updating the assembly list for the runspace:
Could not load file or assembly 'Microsoft.Exchange.PowerShell.Configuration' or one of its dependencies. An argument was out of its legal range. (Exception from HRESULT: 0x80131502).
At line:1 char:13
+ add-pssnapin < <<< Microsoft.Exchange.Management.PowerShell.E2010
+ CategoryInfo : InvalidData: (Microsoft.Excha...owerShell.E2010:String) [Add-PSSnapin], PSSnapInException
+ FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand

I have no idea why the snap-in should come up with errors. The Exchange 2010 Management Tools are installed on the server I'm running this command on. Does anyone have any idea's?

by MikePfeiffer at 2012-08-23 15:59:00

What happens when you launch the Exchange Management Shell using the shortcut? I'm curious if that is also broke.

by Rob25 at 2012-08-23 17:22:51

Hi Mike,

The EMS works fine. I have run a few basic queries on it and all have come up as expected. I might try using a PS Console file to add the Exchange sanp-in and see how that goes.

Cheers,

Rob

by MikePfeiffer at 2012-08-24 06:52:54

Hmmm...yeah that is odd. You may try adding the -Verbose parameter when trying to load it to see if it will give you more details about what the problem is.

by Pat Richard at 2012-09-08 06:54:25

Just remember that adding the pssnapin like that completely bypasses RBAC, and isn't recommended. You'd be better off establishing a remote PowerShell session to an Exchange server.