When ZTIOSConfig.wsf is run in the MDT Task Sequence (in WinPE) it will perform the following steps:
- Copy the OSConfig directory from Applications\OSConfig or Scripts\OSConfig to C:\_SMSTaskSequence\OSConfig
- Create C:\_SMSTaskSequence\OSConfig\OSConfig.cmd
OSConfig.cmd is generated and will perform the following steps:
- Robocopy C:\_SMSTaskSequence\OSConfig to %WinDir%\OSConfig. This is where the OSConfig directory will reside
- Run %WinDir%\OSConfig\OSConfig.vbs with a switch that matches your Operating System (as WMI will not be running when the VBS runs during RunSynchronous)
- Remove C:\_SMSTaskSequence\OSConfig
This is what this looks like in WinPE
Once the computer restarts from WinPE, and the RunSynchronous steps are executed you will see the OSConfig.cmd execute while the computer is “Getting Ready”. This is how you know that it is running properly.
Now in Windows nothing has changed (we didn’t create any OSConfig Settings), but that’s ok. Changes will be reviewed in a different post, we just wanted to make sure that OSConfig works.