Power Shell vars environment

How can I get Power Shell environment variables? Which command should I execute. I am using windows 8.1

+4
source share
2 answers

You can try this command:

Get-ChildItem Env:

Conclusion:

Name                           Value
----                           -----
Path                           D:\Perl\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\...
TEMP                           C:\DOCUME~1\kmyer\LOCALS~1\Temp
SESSIONNAME                    Console
PATHEXT                        .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.PS1;.PSC1
USERDOMAIN                     WINGROUP
PROCESSOR_ARCHITECTURE         x86
SystemDrive                    C:
APPDATA                        C:\Documents and Settings\kmyer\Application Data
windir                         C:\WINDOWS
USERPROFILE                    C:\Documents and Settings\kmyer

Also check out the Windows PowerShell Tip for the week

+4
source

For a given environment variable, such as Path, refer to it like this:

$env:Path

To see all the environment variables, you can visit Ps-Drive "env:"

cd env:

In this you can see and change all environment variables.

+3
source

Source: https://habr.com/ru/post/1584836/


All Articles