• In the task sequence, we’ll introduce a new variable named “TargetGroup”. As of now, this variable isn’t recognized by MDT
  • In my LAB setup, I’ve also incorporated the “WSUSServer” variable, which is familiar to those using MDT. Typically, this variable is set within the customSetting.ini. However, I chose not to do so to avoid affecting my other task sequences.
  • To proceed, you’ll need to modify the ZTIWindowsUpdate.wsf script, which can be found in the “script” directory of your deployment share. If the environment item “WSUSTargetGroup” is not empty, the script will write to the Windows registry, setting the WSUS Target Group accordingly.
If oEnvironment.Item("WSUSTargetGroup") <> "" then
    oShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\TargetGroup", oEnvironment.Item("WSUSTargetGroup"), "REG_SZ"
    oShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\TargetGroupEnabled", 00000001, "REG_DWORD"
End if

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.