On my quest for seamlessly integrating MDT + WDS I also wanted to save bandwidth on Windows updates. Normally we would just setup a WSUS server for the domain and that would be it. However I wanted these machines to get updates from the WSUS server BEFORE they join any domain, since I will be working with multiple domains that have no relation to each other. I found a nice windows script file from http://deploymentbunny.com/2015/03/26/nice-to-know-reset-wsus-settings-after-osd-in-mdt/ the script in the article allows for removing any WSUS settings after deployment! I’ve attached the script on the bottom of this webpage in case the site ever goes down.
Now to set your MDT deployment to take WSUS updates put the WSUSServer line inside of your rules tab. You can get here by right clicking mdt deployment share, and clicking properties.
Now make sure in your task sequence that windows updates pre and post application are both enabled…
Now we need to actually add the script as an application that runs.
Right click applications in the MDT MMC and add a application with source files
Call it something
Browse to the path that has the vbscript file.
Set cscript to execute the script, then keep clicking next till it’s done.
After you’ve added your application, right click it’s properties, it should look like this…
Now add the vbscript application we imported from MDT into the custom tasks category.
Now we’ve made sure that our MDT task sequence uses the WSUS server, then resets it’s settings once it’s done getting updates.
The script… save it as .wsf