I had a question at CMCE Switzerland about how to get acces to the SMSTS variables through Powerhell, so here it is:
In either a script or at a Powershell command window, create a ComObject:
$tsenv = New-Object -ComObject Microsoft.SMS.TSEnvironment
you can use this to access and set Task Sequence variables:
$tsenv.Value(“OSDComputerName”)
will return the value of the OSDComputerName action variable
$tsenv.Value(“SMSTSErrorDialogTimeout”) = 0
sets the timeout on the error message box to something like 6 years (in seconds)