If you have ever worked with Windows Server Update Services (WSUS), you know that it needs to be cleaned out from time to time.  The problem is that it locks up and errors out so frequently with no movement on the progress bar that you often don’t know if it is doing anything.

How to Tell If WSUS Server Cleanup is WorkingIf you want to check to see if WSUS SERVER CLEANUP is working:

  1. start up TASK MANAGER on the server that is running the database
  2. Expand the DETAILS TAB and look for your database engine SQLSERVR.EXE
    1. If you have a default install the database server is the server you have WSUS installed on and the database is called the WINDOWS INTERNAL DATABASE which is just a stripped out version of SQL EXPRESS.
    2. As you can see in the screen shot above we have our WSUS database on a full MS SQL SERVER running on a different server
  3. Watch the CPU number
  4. On the WSUS Server (which is the same server for 90% of WSUS installations), open a POWERSHELL AS AN ADMINISTRATOR
  5. Enter one of the simple command line clean up commands:
    • Invoke-WsusServerCleanup -DeclineSupersededUpdates -CompressUpdates
    • Invoke-WsusServerCleanup -DeclineExpiredUpdates
    • Invoke-WsusServerCleanup -CleanupObsoleteComputers
    • Invoke-WsusServerCleanup -CleanupObsoleteUpdates
    • Invoke-WsusServerCleanup -CleanupUnneededContentFiles -CompressUpdates
  6. If the CPU percent usage number on your SQLSERVR.EXE spikes (as mentioned in step 3) then WSUS is working in the background to clean up the database

If you are still having problems, these pages will help with a broken WSUS:


 

 


1 Comment

SOLVED: Easy SQL Commands To Clean Up WSUS Database Quickly – Up & Running Technologies, Tech How To's · January 3, 2024 at 1:08 pm

[…] How To Tell If WSUS Server Cleanup Is Doing Anything? […]

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *