Learn about Windows PowerShell
Summary: Use Windows PowerShell to ease access to system values.
How can l print out the value of %systemroot%?
a. (get-item Env:\systemroot).value
b. $env:systemroot
hi Ed,
thank's for sharing, here some variant:
PS II> split-path ([Environment]::SystemDirectory)
PS II> gc env:\windir
PS II> [ENVIRONMENT]::ExpandEnvironmentVariables('%WINDIR%')
@Walid Toumi woohoo!!! I love it. The cool thing about PowerShell is there are so many ways to do exactly the same things! Thanks for sharing.