Environmental Variables in PowerShell

https://trevorsullivan.net/2016/07/25/powershell-environment-variables/

From an elevated powershell

[System.Environment]::SetEnvironmentVariable(‘MyAwesomeTargetFolder’, ‘c:\littlebitawesome’, [System.EnvironmentVariableTarget]::Machine)

CLOSE POWERSHELL AND REOPEN IT!!!

(get-item env:MyAwesomeTargetFolder).value

Leave a Reply

Your email address will not be published. Required fields are marked *

two − one =