Samples from the @SCU2014 webinar on ConfigMgr 2012 R2 OSD

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

About the author

Johan Arwidmark

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

>