Tuesday , October 15 2024
Home - Don't Forget! - WSUS Client (Server or Workstation) Reset Settings/Cookie Script

WSUS Client (Server or Workstation) Reset Settings/Cookie Script

Imaging the server in VmWare or by othe means leaves the WSUS client session cookie in the registry.  Once the new imaged server/workstation is then connected back to WSUS the session cookie points the orginal computer object. 

The following script resolves this be resetting client WSUS settings outside of GPO enforced WSUS location:

REM stop the Automatic Updates service
net stop wuauserv
REM Delete SusClientID and AccountDomainSid registry keys
SET WU_KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate
reg delete %WU_KEY% /v SusClientID /f
reg delete %WU_KEY% /v  AccountDomainSid /f
REM Delete registry keys may contain old SUS info
reg delete “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update” /f
REM Start the Automatic Updates service
net start wuauserv
REM Roll the WU Client…
wuauclt /resetauthorization /detectnow

Check Also

The pain of TLS 1.2 with PowerShell module for Azure Active Directory (MSOnline)

Building labs in a hurry sometimes can bite you with recent changes in Office 365 …

Leave a Reply

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