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.
If you want to check to see if WSUS SERVER CLEANUP is working:
- start up TASK MANAGER on the server that is running the database
- Expand the DETAILS TAB and look for your database engine SQLSERVR.EXE
- 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.
- 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
- Watch the CPU number
- On the WSUS Server (which is the same server for 90% of WSUS installations), open a POWERSHELL AS AN ADMINISTRATOR
- 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
- 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:
- Install & Configure WSUS on Windows Server 2012R2 or Server 2016 in 20 Minutes
- The Ultimate Guide To Fixing Windows Server Update Services (WSUS)
- Verifying WSUS Server Settings
- How to Move Update Services WSUS Content Files
- Everything You Need To Know About the Windows Internal Database (WID)
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? […]