Ying Li at myITforum.com

PowerShell & System Center

PowerShell environment provider - $env

Windows PowerShell has a built in environment provider ($env) which will help you to access all the environment variables on a computer.

Interested to know what’s in your PATH system environment variable?

Type this :

$path = $env:path

$path

To view all the environment variables and their values use this command

dir env:

As you can see, here we leave off the $ and reference the env: drive instead.

Posted: Jul 26 2007, 04:32 PM by yli628 | with no comments
Filed under:

Comments

No Comments