I work on Windows 7 and I wont to know how to set and print environment variable in Power Shell (for example $PATH)?


List Environment Variables

Get-ChildItem Env:

Get specific Variable


Modifying/Creating Environment Variables

$env:TestVariable = "This is a test environment variable."

Additional Information: http://technet.microsoft.com/en-us/library/ff730964.aspx?ppud=4

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.