Freigeben über


Script to Reset WSUS for SysPrep'ed Image

Here's a useful script for those, like me, that use SysPrep'ed images to create new virtual machines and also leverage Windows Server Update Services (WSUS) to keep machines up-to-date with the latest patches.

Reset WSUS for SysPrep Image.cmd

 net stop wuauserv

reg.exe delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v PingID /f
reg.exe delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v AccountDomainSid /f
reg.exe delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v SusClientId /f
reg.exe delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v SusClientIDValidation /f

net start wuauserv

wuauclt.exe /resetauthorization /detectnow

I keep a copy of this script in my Toolbox and run it after creating a new VM from a SysPrep'ed image.

If you are not sure why this is helpful, refer to the following KB article:

A Windows 2000-based, Windows Server 2003-based, or Windows XP-based computer that was set up by using a Windows 2000, Windows Server 2003, or Windows XP image does not appear in the WSUS console

https://support.microsoft.com/kb/903262/en-us