How To: List Task Sequence Environment Variables and Values
June 20, 2012 Leave a comment
(another encore presentation from my old blog site…)
From the TechNet forums, this is an example for how to display Task Sequence Environment Variables and Values using VBScript:
Set oTSEnv = CreateObject(“Microsoft.SMS.TSEnvironment”)
For Each oVar In oTSEnv.GetVariables
WScript.Echo oVar & “=” & oTSEnv(oVar)
You could save those two lines of code to “ShowTSVars.vbs”, and then when you want, simply run “cscript //nologo ShowTSVars.vbs >vars.txt” to write all variables to vars.txt.