A. Assuming the boot image has enabled command line support during the Windows Preinstallation Environment (WinPE) boot, you can press F8 then run commands to view variables. I created the following script to view the _SMSTSInWinPE and _SMSTSLaunchMode variables in a test environment.

Dim env : set env = CreateObject("Microsoft.SMS.TSEnvironment")
wscript.echo env("_SMSTSInWinPE")
wscript.echo env("_SMSTSLaunchMode")

I then ran the above script with the command "cscript showvar.vbs"

If you want to list all TS environment variables, use the following script instead.

Dim env : set env = CreateObject("Microsoft.SMS.TSEnvironment")
For Each envVar In env.GetVariables
  WScript.Echo envVar & "=" & env(envVar)
Next
Related Reading:


Check out hundreds more useful Q&As like this in John Savill's FAQ for Windows. Also, watch instructional videos made by John at ITTV.net.