Categories: Business & Tech News

SOLVED: How to List All System Variables in Windows

Bring up a command prompt, type SET, press your enter key.

In my case I needed the variable for the Host Name of the PC that is connecting to a Remote Desktop / Terminal Session.  And that answer is %CLIENTNAME%.

Below is the output from a Server 2008 R1 box but I have confirmed that a Server 2012 box is very similar.

Microsoft Windows [Version 6.0.6002] Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\Users\imdin>set

ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\imdin\AppData\Roaming
CLIENTNAME=A13035
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files

COMPUTERNAME=NEO1-VM2-TS ComSpec=C:\Windows\system32\cmd.exe
DEFLOGDIR=C:\ProgramData\McAfee\DesktopProtection
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C: HOMEPATH=\Users\imdin
LOCALAPPDATA=C:\Users\imdin\AppData\Local
LOGONSERVER=\\N-DC
NUMBER_OF_PROCESSORS=4
OS=Windows_NT
Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\Sys \WindowsPowerShell\v1.0\
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 23 Stepping 6, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=1706
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
PROMPT=$P$G
PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
PUBLIC=C:\Users\Public
SESSIONNAME=RDP-Tcp#0 SystemDrive=C:
SystemRoot=C:\Windows
TEMP=C:\Users\imdin\AppData\Local\Temp\2
TMP=C:\Users\imdin\AppData\Local\Temp\2
USERDNSDOMAIN=urtech.ca
USERDOMAIN=N
USERNAME=imdin
USERPROFILE=C:\Users\imdin
VSEDEFLOGDIR=C:\ProgramData\McAfee\DesktopProtection
windir=C:\Windows

Published by
Ian Matthews

This website uses cookies.