Can't add Snapin

Hi all,

I have a new computer and i can’t run the a script i use to run on my old one.
I get an error message

PS F:> Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn;
Add-PSSnapin : No snap-ins have been registered for Windows PowerShell version 5.
At line:1 char:1

  • Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn;
  •   + CategoryInfo          : InvalidArgument: (Microsoft.Excha...werShell.SnapIn:String) [Add-PSSnapin], PSArgumentException
      + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand
    

I have searched everywhere with no luck. I hope i will find here the solution.

I already set the "ExecutionPolicy " to “RemoteSigned”

Here are the “Old” computer details:
Win 10 pro version 1809 Build 17763.1577
PS version 5.1.17763.1490

New computer details:
Win 10 pro version 20H2 build 19042.1466
PS version 5.1.19041.1320

Any help will be appreciated.

IMO, you gotta have the exchange management tools installed. That snapin is not by default available in the OS>

What problem do you try to solve actually? We actually do not use snapins anymore. On an on premisses Exchange server you can launch an Exchange management shell with launchems. If you want to manage an Exchange server remotely you should use implicit remoting to use the Exchange cmdlets.

2 Likes

Implicit remoting is great. If you really want the old snappin you’ll have to install the exchange management tools for the specific version. I believe you can still access older exchange with newer tools. There is also an unsupported remote exchange setup script you can find on the internet. I believe I even posted it as an answer on this very forum, I’ll try to find it.

Check my answer on this post

Edit
Looks like that script was on Technet. Thank goodness for the internet archive!

Archived page

Direct link to ps1
https://web.archive.org/web/20200328155702/https://gallery.technet.microsoft.com/Import-ModuleExchange-010da141/file/134284/3/Import-ModuleExchange.ps1