MDT: Install updates with WSUS

Presentation

In this tutorial, I’ll explain how to enable Windows updates to a WSUS server when deploying an image with MDT.

Enable updates

Open the properties of an installation sequence, go to the Task Sequence 1 tab and activate one of the two update patches 2 by unchecking the Disable this step 3> box. > and click on the Apply 4 and OK 5 buttons.
Enable update task

Open the properties of the Deployment Share, go to the Rules 1 tab, in the Default section add the parameter WSUSServer 2 and click on Apply 3 and OK 4 .
WSUSServer parameter

At the next deployment the updates will be installed.
Installing updates during deployment

Set up client-side targeting

If client-side targeting is enabled on your WSUS server, there are small additional changes that must be made to perform updates when deploying with MDT.

Go into the properties of the task sequence and add a new task. Click on Add 1 / General 2 / Set Task Variable Sequence 3 .
Add task

Edit the new task, enter a name 1 , in the field Task Sequence Variable put WSUSGroup 2 , in the field Value indicate the name of the group WSUS 3 and click Apply 4 then OK 5 .
Edit task

It is now necessary to modify the ZTIWindowsUpdate.wsf file located in the Scripts folder of the Deployment Share folder.

Rechercher :

oShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\WUServer", oEnvironment.Item("WsusServer"), "REG_SZ"
oShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\WUStatusServer", oEnvironment.Item("WsusServer"), "REG_SZ"

Ajouter après :

If oEnvironment.Item("WSUSGroup") <> "" then
	oShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\TargetGroup", oEnvironment.Item("WSUSGroup"), "REG_SZ"
	oShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\TargetGroupEnabled", 00000001, "REG_DWORD"
End if

 


How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count:

We are sorry that this post was not useful for you!

Let us improve this post!



Related Posts


GPO: deploy msi applications
Presentation In this article, we will see how to deploy applications in MSI format using Group Policy (GPO). There are two deployment modes : Assigned: Applies mainly to computers, program installation is forced. Published: applies only to users, thi

Deploy Windows with MDT and WDS
In this tutorial, I will explain how to use the Microsoft Deployment Toolkit (MDT) and Windows Deployment Services (WDS) pairing to deploy Windows images (7/8. (1) / 10) using the PXE boot. Prerequisites A server with the WDS role installed and confi

MDT: use with a database
In this tutorial, we will see how to use MDT with a database. The use of this one makes it possible to store in a database the information of deployment for a station to identify for example by its MAC address, which makes it possible when one has to

Leave a Comment