PowerShell Logo Small

Remove-PSSnapin



This is the built-in help made by Microsoft for the command 'Remove-PSSnapin', in PowerShell version 2 - as retrieved from Windows version 'Microsoft® Windows Vista™ Ultimate ' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Removes Windows PowerShell snap-ins from the current session.

SYNTAX


Remove-PSSnapin [-Name] <string[]> [-PassThru] [-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Remove-PSSnapin cmdlet removes a Windows PowerShell snap-in from the current session. You can use it to remove snap-ins that you have added t
o Windows PowerShell, but you cannot use it to remove the snap-ins that are installed with Windows PowerShell.

After a snap-in is removed from the current session, it is still loaded, but the cmdlets and providers in the snap-in are no longer available in
the session.



<

RELATED LINKS

Online versirent session. When the command is complete, the cmdlets and providers that the sn
ap-in supported are not available in the session.








-------------------------- EXAMPLE 2 --------------------------

C:\PS>get-PSSnapIn smp* | remove-PSSnapIn



Description
-----------
This command removes the Windows PowerShell snap-ins that have names beginning with "smp" from the current session.

The command uses the Get-PSSnapin cmdlet to get objects representing the snap-ins. The pipeline operator (|) sends the results to the Remove-PSSn
apin cmdlet, which removes them from the session. The providers and cmdlets that this snap-in supports are no longer available in the session.

When you pipe objects to Remove-PSSnapin, the names of the objects are associated with the Name parameter, which accepts objects from the pipelin
e that have a Name property.








-------------------------- EXAMPLE 3 --------------------------

C:\PS>remove-pssnapin -name *event*



Description
-----------
This command removes all Windows PowerShell snap-ins that have names that include "event". This command specifies the "Name" parameter name, but
the parameter name can be omitted because it is optional.