Removes Windows PowerShell snap-ins from the current session. (Remove-PSSnapin)

   

# NAME
Remove-PSSnapin

# SYNOPSIS
Removes Windows PowerShell snap-ins from the current session.

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

# 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 to 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.

# PARAMETERS
-Name <string[]>
Specifies the names of Windows PowerShell snap-ins to remove from the current session. The parameter name ("Name") is optional, and wildcard characters (*) are permitted in the value.

Required? true
Position? 1
Default value None
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? true

-PassThru [<SwitchParameter>]
Returns an object representing the snap-in. By default, this cmdlet does not generate any output.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Confirm [<SwitchParameter>]
Prompts you for confirmation before executing the command.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-WhatIf [<SwitchParameter>]
Describes what would happen if you executed the command without actually executing the command.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

# INPUTS
System.Management.Automation.PSSnapInInfo
You can pipe a snap-in object to Remove-PSSnapin.

# OUTPUTS
None or System.Management.Automation.PSSnapInInfo
By default, Remove-PsSnapin does not generate any output. However, if you use the PassThru parameter, it generates a System.Management.Automation.PSSnapInInfo object representing the snap-in.

# NOTES

You can also refer to Remove-PSSnapin by its built-in alias, "rsnp". For more information, see about_Aliases.

Remove-PSSnapin does not check the version of Windows PowerShell before removing a snap-in from the session. If a snap-in cannot be removed, a warning appears and the command fails.

Remove-PSSnapin affects only the current session. If you have added an Add-PSSnapin command to your Windows PowerShell profile, you should delete the command to remove the snap-in from future sessions. For instructions, see about_Profiles.

# EXAMPLE 1

C:\PS>remove-pssnapin -name Microsoft.Exchange

# Description
-----------
This command removes the Microsoft.Exchange snap-in from the current session. When the command is complete, the cmdlets and providers that the snap-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-PSSnapin 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 pipeline 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.

RELATED LINKS
Online version: http://go.microsoft.com/fwlink/?LinkID=113378
Add-PSSnapin
Get-PSSnapin
about_Profiles

C:\Windows>powershell get-help Get-PSSnapin -full

ColorConsole [Version 1.7.1000] PowerShell 2.0-Export
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2014 Microsoft Corporation.

OS: Windows 10, 8.1, 8, 7, Vista / Windows Server 2016, 2012, 2008
»»»» ColorConsole









... Windows-10




Windows 10 How To

... Windows 10 FAQ
... Windows 10 How To




PowerShell: Removes Windows PowerShell snap-ins from the current session.

HTTP: ... PS_Windows/en/Remove-PSSnapin.htm
0.203
13428

Desktop Verknüpfung zum Windows 8.1, 8 und 10 Wartungscenter!

 /

What is a solid state drive?

 /

Wozu der alternative Windows 11, 10, ... Explorer, es gibt doch den MS Explorer!

 /

Save electricity, save hardware, save money, save nature on all Windows!

 /

The digital Windows 11, 10, ... desktop clock without lock screen!

 /

Dock the window in the screen area under Windows 11!

 /

Gibt es Vista Hotkeys für die Schnellstartleiste?

 /

Desktopverknüpfung erstellen bei Windows (11, 10, 8.1, 7)?

 /

Why hide the Windows 11, 10, ... mouse pointer or cursor?

 /

New in QTP 5.01 Menu sorting, submenus and icons!

 /

Windows x64 operating systems, what´s that?

 /

System administrator Windows 11/10, how to activate the full admin account?

 /