Custom Task Sequence (TS) Variable is useful when we have different Images deployments. We can setup the variable to control what application or software should be deployed by reading those variables. PowerShell MVP Stéphane van Gulick provides the awesome OSD tattoo script to manipulate task sequence variables. It can read TS variables and write them into Registry, WMI and Environment variables. I will demonstrate how I use OSD Tatto script to add custom TS variable.
First, I create two Task Sequence Variables in the Task Sequence.
Then, add the PowerShell script and the Parameters.
The New-OSDTattoo.ps1 will need to be updated in order to read and write the custom TS variables that we created.
Add two custom lines under the PSDistrict_ variables in the main script region . It locates at about line 911 in the script.
After deployed the task sequence to the test computer, we can see the variables are written into the Registry.