1

To preface this, this script i made that involves creating 2007 MS Exchange mailboxes had worked a week or two ago, and suddenly gave me an error (below) from this:

Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin

error given:

Add-PSSnapin : No snap-ins have been registered for Windows PowerShell version 5.

I have been all over and can't find anything to help. the command get-PsSnapins -registered doesn't give me anything. I did a clean windows 7 install, did all the windows updates, everything i can think of. I've tried running it without that snap-in but powershell doesn't recognize it as a cmdlet. All out of ideas and options

I am an admin on the network, machine, and running powershell as an admin. Execution policy is set to unrestricted

toupin
  • 11
  • 1
  • 3

1 Answers1

1

As an FYI, PowerShell 5.0+ is incompatible with Microsoft Exchange 2013: Product Compatibility Status

You should use PSRemoting to connect to the Exchange server, and run from there Directly Loading Exchange 2010 or 2013 SnapIn Is Not Supported:

$ExSession =  New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri 'http://exServer01.contoso.com/PowerShell/' -Authentication Kerberos
Import-PSSession ($ExSession) -AllowClobber

If this was working for you in the past, make sure that you are launching the 32 bit Windows PowerShell (x86) version of PowerShell, as the Exchange Snapin is not 64 bit.

HAL9256
  • 9,157
  • 26
  • 36