Load Cmdlets from PSSnapins

by Jun 17, 2015

Most cmdlets these days are organized in modules. Modules were introduced in PowerShell 2.0. Their main advantage is copy&paste deployment (no installation required) and module auto-loading (PowerShell automatically loads modules when you need them).

Some cmdlets are still organized in PowerShell snap-ins (PSSnapins) and not in modules. PSSnapins were introduced in PowerShell 1.0. PSSnapins need to be installed, and since they are registered in HKEY_LOCAL_MACHINE, they always require Administrator privileges for installation.

To list all available PSSnapins, run this:

Get-PSSnapin -Registered

In contrast to modules, PSSnapins always need to be loaded manually before you can use the cmdlets found in PSSnapins. This line would load all available PSSnapins:

Get-PSSnapin -Registered | Add-PSSnapin -Verbose

Twitter This Tip! ReTweet this Tip!