Created
April 29, 2024 17:59
-
-
Save davidelambert/e035a44aaa4d1d79e52716d4f7aa668f to your computer and use it in GitHub Desktop.
PowerShell: Set Windows environment variable with system-wide ('Machine') scope
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Run in elevated PowerShell session | |
| [Environment]::SetEnvironmentVariable('VariableName', 'Value', 'Machine') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment