Uninstall-ChocolateyEnvironmentVariable
Uninstall-ChocolateyEnvironmentVariable
Uninstall-ChocolateyEnvironmentVariable
:choco-info: NOTE
Administrative Access Required when
-VariableType 'Machine'.
Removes a persistent environment variable.
Syntax
Uninstall-ChocolateyEnvironmentVariable `
-VariableName <String> `
[-VariableType {Process | User | Machine}] `
[-IgnoredArguments <Object[]>] [<CommonParameters>]
Description
Uninstall-ChocolateyEnvironmentVariable removes an environment variable with the specified name and value. The variable can be scoped either to the User or to the Machine. If Machine level scoping is specified, the command is elevated to an administrative session.
Notes
This command will assert UAC/Admin privileges on the machine when
-VariableType Machine
.
This will remove the environment variable from the current session.
Aliases
None
Examples
EXAMPLE 1
# Remove an environment variable
Uninstall-ChocolateyEnvironmentVariable -VariableName 'bob'
EXAMPLE 2
# Remove an environment variable from Machine
Uninstall-ChocolateyEnvironmentVariable -VariableName 'bob' -VariableType 'Machine'
Inputs
None
Outputs
None
Parameters
-VariableName <String>
Property | Value |
---|---|
Aliases | |
Required? | true |
Position? | 1 |
Default Value | |
Accept Pipeline Input? | false |
-VariableType
Valid options: Process, User, Machine
Property | Value |
---|---|
Aliases | |
Required? | false |
Position? | 2 |
Default Value | User |
Accept Pipeline Input? | false |
-IgnoredArguments [<Object[]>]
Property | Value |
---|---|
Aliases | |
Required? | false |
Position? | named |
Default Value | |
Accept Pipeline Input? | false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters
http://go.microsoft.com/fwlink/p/?LinkID=113216 .
Links
Function Reference:choco-info: NOTE
This documentation has been automatically generated from
Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Uninstall-ChocolateyEnvironmentVariable -Full
.
View the source for Uninstall-ChocolateyEnvironmentVariable