If you cannot complete a clean up of your WSUS server through the WSUS console because it keeps erroring out with SERVER NODE RESET, you can hopefully complete through the following PowerShell command line:
Invoke-WsusServerCleanup -DeclineSupersededUpdates -DeclineExpiredUpdates -CleanupObsoleteComputers -CleanupObsoleteUpdates -CleanupUnneededContentFiles -CompressUpdates
Note that if your WSUS database is corrupted or has other issues, you will want to run WSUS Database cleanup as we describe HERE.
There are a few notes to this script:
- You need to run POWERSHELL as an Admin
- If you see the following error go to your SERVICES and start WSUS Certificate Server or just type NET START WSusCertServer
Invoke-WsusServerCleanup : The service cannot be started, either because it is disabled or because it has no enabled devices associated with it
- As you can see in the screen shot my first round at this failed. I also had .NET error the appeared which I mistakenly cleared before reading carefully. Then I shortened up the script to do less:
Invoke-WsusServerCleanup -CleanupUnneededContentFiles -CompressUpdates
Then I ran the other half of the script:
Invoke-WsusServerCleanup -DeclineSupersededUpdates -DeclineExpiredUpdates -CleanupObsoleteComputers -CleanupObsoleteUpdates
Then I ran the entire script again, which apparently did nothing. After that I was able to the WSUS SERVER CLEAN UP WIZARD from the WSUS console without problem.