All things WSUS
A variety of fun things that have dug me out of multiple WSUS related holes
Cleaning Unused Updates
Getting reset server node is pretty common with this, so spin up SQL Management Studio and run:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE SUSDB | |
DECLARE @UpdateID INT | |
DECLARE @message varchar(1000) | |
CREATE TABLE #ObsoleteUpdatesToCleanup (UpdateID INT) | |
INSERT INTO #ObsoleteUpdatesToCleanup(UpdateID) EXEC spGetObsoleteUpdatesToCleanup | |
DECLARE DeleteUpdates CURSOR FOR SELECT UpdateID FROM #ObsoleteUpdatesToCleanup | |
OPEN DeleteUpdates | |
FETCH NEXT FROM DeleteUpdates INTO @UpdateID WHILE (@@FETCH_STATUS > -1) | |
BEGIN SET @message = 'Deleting update ' + CONVERT(VARCHAR(10), @UpdateID) RAISERROR(@message,0,1) WITH NOWAIT | |
--PRINT 'Deleting update ' + CONVERT(VARCHAR(10), @UpdateID) | |
EXEC spDeleteUpdate @localUpdateID=@UpdateID | |
FETCH NEXT FROM DeleteUpdates INTO @UpdateID | |
END | |
CLOSE DeleteUpdates | |
DEALLOCATE DeleteUpdates | |
DROP TABLE #ObsoleteUpdatesToCleanup |
Windows has no updates from WSUS
Had this after creating a new VM from a fully patched VHDX. Updates from WSUS would only work after checking against Microsoft Update first.
1. Stop Windows Update Service
2. Delete contents of c:\windows\softwaredistribution
3. Check for Updates against WSUS again
Comments
Post a Comment