DaveHope.co.uk

Microsoft Deployment & WSUS

Microsoft have recently launched the latest version of BDD, now called “Microsoft Deployment” If you ask me, BDD sounded better but oh well.

If like me you don’t want to create packages for each and every windows update for your deployment image, here’s how you can point the build process at your WSUS server.

Firstly, create the following file and store it in your ‘Scripts’ folder, for example ” C:\Distribution\Scripts\CustWsusSettings.wsf”:


' //***************************************************************************
' // ***** Script Header *****
' //
' // File: CustWsusSettings.wsf
' //
' // Purpose: Deploy WSUS Settings
' //
' // Customer Build Version: 1.0.0
' // Customer Script Version: 1.0.0
' //
' // Customer History:
' //
' // ***** End Header *****
' //***************************************************************************
<job id="CustWsusSettings">
<script language="VBScript" src="ZTIUtility.vbs"/>
<script language="VBScript" src="WizUtility.vbs"/>
<script language="VBScript">
sWSUSServer = "http://london.nwtraders.msft:8530"
oShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\WUServer", sWSUSServer, "REG_SZ"
oShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\WUStatusServer",sWSUSServer, "REG_SZ"
oShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\UseWUServer",1, "REG_DWORD"
' Return success.
wscript.quit 0
</script>
</job>

Be sure to change the sWSUSServer to point to your Wsus server. Now open up your task list in the Deployment Console and create a new command line task of the following:

cscript.exe "%SCRIPTROOT%\CustWsusSettings.wsf"

And as if by magic your updates will now come from your WSUS box from install.

Comments

Leave a Reply