Get-PSSnapin

List PowerShell snap-ins on this computer.

Syntax
      Get-PSSnapin [[-name] string[]] [-registered] [CommonParameters]

Key
   -name
       The PowerShell snap-in(s). Wildcards are permitted.
        
   -registered 
       Get only the PowerShell snap-ins that have been registered on 
       the system. The snap-ins that are installed with Windows PowerShell do 
       not appear in this list.

   CommonParameters:
       -Verbose, -Debug, -ErrorAction, -ErrorVariable, -WarningAction, -WarningVariable,
       -OutBuffer -OutVariable.

Standard Aliases for Get-PSSnapin: gsnp

PowerShell contains a default set of snap-ins containing the built-in providers and cmdlets.

In PowerShell 1.0 these default Snap-Ins are:
Microsoft.PowerShell.Core = components of PowerShell.
Microsoft.PowerShell.Host = Start-Transcript, Stop-Transcript etc, managing PowerShell console host.
Microsoft.PowerShell.Management = management cmdlets used to manage Windows components.
Microsoft.PowerShell.Security = cmdlets to manage Windows PowerShell security.
Microsoft.PowerShell.Utility = utility Cmdlets used to manipulate data.

PowerShell 2.0 adds to the above:
Microsoft.PowerShell.Diagnostics = Eventing and Performance Counter cmdlets.
Microsoft.WSMan.Management = Get-WSManInstance, Set-WSManInstance etc for WSMan operations.

Installing a Snap-In requires Administrator rights.

In PowerShell 2.0 the new Modules functionality is generally preferred for extending the functionality of the shell (but Snap-Ins are still supported). Equivalent commands for Snap-Ins and Modules are shown below:

Get-PSSnapIn -registered
Add-PSSnapIn name
Get-Command -pssnapin name

Get-Module -ListAvailable
Import-Module name
Get-Command -module name

Examples

Get the Windows PowerShell snap-ins that are currently loaded:

PS C:> get-PSSnapIn

Gets the PowerShell snap-ins registered on the computer:

PS C:> get-PSSnapIn * -registered

"A man's got to know his limitations" - Harry Callahan (Magnum Force)

Related:

Add-PSSnapIn - Add snap-ins to the console
Get-Module - Get the modules imported to the session
Remove-PSSnapin - Remove PowerShell snap-ins from the console
Export-Console - Export console configuration to a file


© Copyright SS64.com 1999-2013
Some rights reserved