WSUS: maintenance and optimization


Windows Server 2019

Intro

In this tutorial, I will explain how to maintain and optimize the installation of your WSUS service to keep it in optimal operating condition.

If your WSUS console shuts down regularly, I advise you to switch the database to SQL Server. For that you have two solutions:

WSUS Maintenance

Reject replaced Updates

As the months pass, updates accumulate on the WSUS server and some updates are overwritten by others.

Keeping the updates replaced have no interest.

From the list of approved updates 1 , select the updated updates that are identifiable using the pictograms visible in the capture.
updates replaced

Once the updates are selected, right click on 1 and click on Refuse 2 .
Refuse the updated updates

Confirm the action by clicking Yes 1 .
Confirm action

Wait during the refusal of the updates …
Wait

Replaced updates are now rejected and no longer shown to computers.

Clean unused files

Cleaning unused files will remove the files physically present on the server.

We will find in these files the replaced updates that were refused.

From the Administration Console, click Options 1 and then click Server Cleanup Wizard 2 .
WSUS options

At the launch of the wizard, you must choose the items to clean, leave the check box Unwanted update files 1 and click Next 2 .
Select option for cleanup

Wait while cleaning …
wait...

Once the cleaning is done, click on the button Finish 1 to close the wizard. In the summary appears the freed space.
WSUS - clean space

Reindexing the database

In order to maintain optimal database performance, it is necessary to reindex the database.

A script is available on the Technet website at this address : Scripts/Maintenance and optimization/WsusDBMaintenance.sql · master · RDR-IT / WSUS · GitLab (rdr-it.io)

Start Microsoft SQL Server Management Studio and connect to the base instance where the WSUS database is running.
SSMS

Right-click on SUSDB 1 and click on New Query 2 .
New query

Paste the script into the query box 1 and click on Run 2 .
Query

Wait while processing the request …

Once the query is executed, the result is displayed under 1 .
Query result

Reduce the size of the base

Always from SSMS, right click on the database SUSDB 1 then go to Tasks 2 / Reduce 3 and click on Database 4 .
Optimize Database

Click OK 1 to start the database reduction.
Start the reduction of the database

Once optimization is complete, the window closes automatically.

Conclusion

The tips differences in this article will help keep the WSUS services in an operational state.




Leave a Comment