Skip to content

Instantly share code, notes, and snippets.

@bryandam
Last active April 10, 2018 14:08
Show Gist options
  • Save bryandam/19adef19d1e296b1fa391aa0e2ce67a6 to your computer and use it in GitHub Desktop.
Save bryandam/19adef19d1e296b1fa391aa0e2ce67a6 to your computer and use it in GitHub Desktop.
SQL Query to Remove Obsolete Updates from WSUS
declare @update varchar( max )
select @update = min( LocalUpdateID ) from spGetObsoleteUpdatesToCleanup
while @update is not null
begin
EXEC spDeleteUpdate @update
select @update = min( LocalUpdateID ) from spGetObsoleteUpdatesToCleanup
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment