Skip to content

Instantly share code, notes, and snippets.

@Chris-ZA
Chris-ZA / Delete Obsolete WSUS Updates.sql
Last active February 6, 2018 20:53
Script to Delete Obsolete WSUS Updates
-- This script deletes all obsolete WSUS updates from a WSUS database.
-- For more information, visit http://thebashfuladmin.com/2016/05/13/workaround-for-wsus-sql-timeout-errors/
USE SUSDB
DECLARE @UpdateID INT
DECLARE @message varchar(1000)
CREATE TABLE #ObsoleteUpdatesToCleanup (UpdateID INT)