Resetting WSUS

WSUSWindows Server Update Services, is an application offered by Microsoft that can download and manage updates for Windows Server operating systems.

Actually, It is the successor of the previous Software Update Services (SUS) program. It helps in the constantly updating of the wide range of operating systems and related applications that provided by microsoft. It also enables the IT administrators of small to medium sized businesses (SMBs) to effectively manage the released updates to the computers in their network.

WSUS2

Resetting Process of WSUS

Follow the below steps to completely reset or rebuild WSUS from scratch:

Stop the Services of WSUS

  • Then, Launch CMD and run the below, to stop all the services

net stop W3SVC && net stop WsusService && net stop WSusCertServer

Creating the SQL Script to backup the pre-existing database then drop

  • Then save the below by using notepad as ‘ResetWSUS.sql’

BACKUP DATABASE [SUSDB] TO DISK = N’c:\temp\susdb.bak’ WITH NOFORMAT, NOINIT, NAME = N’SUSDB-Full Database Backup’, SKIP, NOREWIND, NOUNLOAD, STATS = 10

  • Next, GO.

ALTER DATABASE SUSDB SET OFFLINE WITH ROLLBACK IMMEDIATE; DROP DATABASE SUSDB;

  • GO

Backup and Drop the database

  • Now, Open CMD and Administrator and run. Assumes that you have previously installed the WSUS prerequisites from here.

sqlcmd -S .\pipe\MICROSOFT##WID\tsql\query -i c:\temp\ResetWSUS.sql

Delete the database files

  • You need to open CMD and Administrator and then run.

del /Q C:\Windows\WID\Data\SUSDB.*
del /Q C:\Windows\WID\Data\SUSDB_.

Delete the WSUS folder

  • Substitute D:\WSUS for your folder location

rmdir /Q /S D:\WSUS

Reconfiguration of WSUS SUSDB and Folders

  • For this, Open CMD and Administrator and run.

net start WsusService && net start WSusCertServer

C:\Program Files\Update Services\Tools\wsusutil.exe” postinstall CONTENT_DIR=”D:\WSUS