Those who have, or those who have seen SCCM 2012 update capacities of its WIM images directly from the repository, have certainly wonder why couldn’t we do the same with MDT.
The common bypassing solution is the ‘Build and Capture’ task sequence that will update the Windows 10 base image, for example. Then, we would re-capture it so we could use it as a base in our TS deployment… Only, it’s time-consuming, it makes a sysprep and, having to store all those versions of different images takes a large amount of space storage.
So, there’s a possible, fast and quite simple solution: DISM style!
For example, for a Windows 10 LTSB 2016 image, you have to apply the lasts waves of cumulative and security updates at the very least.
In the next example, I’ve created on my MDT machine, a c:\Updates and a c:\Mount folders. I put all the updates that I want to apply to my OS in c:\Updates (I use Windows Update Catalogue, once a month)
· Nothing special to put on c:\Mount
Once my updates are set, I just have to launch an deployment tool CMD prompt as an Admin. And type the next three lines that are simply going to mount the image in C:\Mount, then parse the updates in C:\Updates to integrate them in my image, and finally, un-mount it committing the changes…
How? Like this:
DISM /Mount-Wim /WimFile:D:\Deployment share\Operating Systems\LTSB2016x64\Sources\install.wim /index:1 /Mountdir:C:\Mount
(Directly recovers the image from Deployment Share and mounts it in C:\Mount)
DISM /image:C:\Mount /Add-Package /Packagepath:C:\Updates\
(Applies the current packages in C:\Updates to the image)
DISM /Unmount-Wim /Mountdir: C:\Mount /commit
(un-mounts the image after applying changes, then cleans it to make it lighter)
Quite simple and efficient, even though it’s not new, but I’ve been asked the question so I post the answer…
It is a simple way to keep your WIM references images up to date.
Homework for tonight:
PowerShell can let you automatize your tasks…
1- from the Store, download the updates -or from WSUS if you have it-
2- Create an update folder for each OS
3- Take each image in your Deployment Share, make a backup copy of them just in case, integrate the updates, un-mount and clean them. If everything goes well, delete the backup copy, otherwise do a roll back of the backup image.
4- Do this with every image… then write an e-mail with a report about what it did
5- Plan a task on next Thursday that follows the second Tuesday of the month (patch Tuesday)
The first one that sends me the complete script (and correct script) will win a Red Kaffe MUG!
Text translated by