On November 13, 2013, I presented a webinar for System Center Universe were I was using a few PowerShell scripts (well two), to enumerate variables during deployment.
After the session I got a request for the scripts, so here they are:
EnumVariable.ps1
Just listing the variables used by the task sequence
Write-Host "PowerShell is King!"
$tsenv = New-Object -ComObject Microsoft.SMS.TSEnvironment
$tsenv.GetVariables() | ForEach-Object {Write-Host $_}
Exit 0
EnumVariablesAndValues.ps1
Listing the variables and their values used by the task sequence
Write-Host "PowerShell is King!"
$tsenv = New-Object -ComObject Microsoft.SMS.TSEnvironment
$tsenv.GetVariables() | % { Write-Host "$_ = $($tsenv.Value($_))" }
Exit 0
Happy deployment, Johan