Set-EnvironmentVariable
Set-EnvironmentVariable
Set-EnvironmentVariable
SYNOPSIS
NOTE
Administrative Access Required when
-Scope 'Machine'.
DO NOT USE. Not part of the public API. UseInstall-ChocolateyEnvironmentVariable
instead.
SYNTAX
DESCRIPTION
Saves an environment variable.
EXAMPLES
Example 1
Sets the MyApplicationPath
environment variable to C:\test
at the system level.
PARAMETERS
-IgnoredArguments
Allows splatting with arguments that do not apply. Do not use directly.
-Name
The name of the environment variable to set.
-Scope
The scope to set the environment variable at.
-Value
The value to set the named environment variable to.
-Confirm
Prompts you for confirmation before running the cmdlet.
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
OUTPUTS
NOTES
This command will assert UAC/Admin privileges on the machine if
-Scope 'Machine'
.