August 29th, 2012

PowerTip: Accessing System Values

Doctor Scripto
Scripter

Summary: Use Windows PowerShell to ease access to system values.

Hey, Scripting Guy! Question How can l print out the value of %systemroot%?

Hey, Scripting Guy! Answer 

a. (get-item Env:\systemroot).value

b. $env:systemroot

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.