Inject Windows Updates into WIM Image Files and Clean Up WIM Using PowerShell
If you have custom built images that you are using in your Configuration Manager OSD environment, you may find that keeping them up to date is a real problem. If you are happy with the image itself and do not want to make any changes to it, why should you need to rebuild and recapture it to include all the latest Windows Updates?
One solution is to install Windows Updates during your OSD task sequence which is great, but very time consuming if you image is a few months (in some cases years!) old.
However, there is a way of injecting Windows Updates into your custom WIM files offline and then simply redistributing your WIM file to your local and remote distribution points. You used to have to install WAIK to do this, however, as Windows 10 has DISM built into it, you can now simply use your standard client Windows operating system and take advantage of a little PowerShell scripting.
Below is the guide on how to carry this out and a list of downloads that you will require.
STAGE 1 – Download required offline Windows Updates
Download the WSUS Offline Tool from the link above and extract the zip file to a directory on your computer – for this guide purposes, we will use “D:WSUS” (although most people will use a C: drive location).
Run the “UpdateGenerator.exe” file located in the root of extracted files.
You will be presented with a program and you can select the versions of Windows, Office and Legacy products that you wish to update. Remember to include (or exclude) the x86 and x64 versions if you want to update these different architectures.
You also have the option to use a WSUS server on your local network to retrieve the Windows Updates from (this is much quicker if you have a slower internet connection). To do this, click the WSUS button at the bottom and enter the URL of your WSUS server:
If you wish to download all the available updates from Windows Update server, do not enter any information into this setting.
Once you have selected all the options that you want to download updates for, press the Start button at the bottom left. A command box will appear and will start to download all the required updates – this can take a long time depending on your selections and internet speed. These updates will be copied into the folder structure of the extracted files (“D:WSUS”).
Please note that although the first set of downloads will take a while, you can then run this process again at a later date and it will only download any newer updates required. This way you can keep an up to date repository of offline Windows Updates.
Once all your updates have been downloaded, you should then continue with the next stage of the process.