...
Code Block | ||
---|---|---|
| ||
# Setting a user-level persistent environment variable [Environment]::SetEnvironmentVariable('PersistentVar', 'Persistent Value', 'User') # Setting a machine-level persistent environment variable [Environment]::SetEnvironmentVariable('PersistentVar', 'Persistent Value', 'Machine') |
Related Pages
Excerpt | ||||
---|---|---|---|---|
| ||||
Internal_Note
|
Code Block |
---|
$env:TEMP_VAR = "temp_value"
|
This variable will not persist after the PowerShell session ends.