PowerShell Logo Small

Remove-Variable



This is the built-in help made by Microsoft for the command 'Remove-Variable', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' 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

Deletes a variable and its value.

SYNTAX


Remove-Variable [-Name] <String[]> [-Exclude [<String[]>]] [-Force] [-Include [<String[]>]] [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore |
Suspend}] [-InformationVariable [<System.String>]] [-Scope [<String>]] [-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Remove-Variable cmdlet deletes a variable and its value from the scope in which it is defined, such as the current session. You cannot use this cmdlet to delete
variables that are set as constants or those that are owned by the system.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/p/?linkid=294006
Clear-Variable
Get-Variable
New-Variable
Set-Variable
about_Profiles

REMARKS

<

Examples


-------------------------- EXAMPLE 1 --------------------------

PS C:\>remove-variable Smp



This command deletes the $Smp variable.