Q. How can I check the value of Microsoft System Center Configuration Manager 2007 (SCCM) task sequence variables during a deployment?

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.
Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish