You are here:   Research
  |  Login

Welcome to my blog, quickest way to find articles is usually to search for them.

Search in All Title Contents

Maintaining WSUS Like a Boss!

Jun 05 2016

For those of you using WSUS standalone for your updates, here is a collection of tips and tricks:

What if you are using the Windows Internal Database (WID)?

Typically I like to use either the full SQL Server (if the customer have the license), or SQL Express for the WSUS database because they are slightly easier to manage. But what if you already have WSUS using WID? Well, no need to worry, you can still download SQL Server 2014 Management Studio from Microsoft: and use it to connect to the database for management:

To connect to the Windows Server 2012 R2 Windows Internal Database, use the following connection: \\.\pipe\microsoft##WID\tsql\query

Note: If your account wasn’t used to install WID, run SQL Server 2014 Management Studio as Administrator.

Connecting to the WSUS Windows Internal Database in Windows Server 2012 R2.

Cleanup WSUS every now and then

Cleaning out obsolete and deleted updates is key to have your WSUS healthy. Even though it’s available via the UI, please don’t, use PowerShell for automation. Use the WSUS Server Cleanup script from Kaido Järvemets.  That script will run the WSUS cleanup and mail a nice HTML report with the status of the job (you can also just comment out the mailing part, and only use the HTML report created).

Sample report from the PowerShell script.

Rebuild the WSUS database indexes

Use the Re-index the WSUS 3.0 Database script from Microsoft Script Center, also works great with WSUS 4.0. Use either Sqlcmd or PowerShell (Invoke-Sqlcmd cmdlet ) to automate it.

Note: If you only want to check the fragmentation level, just run the first part of the script.

Running the rebuild in SQL Server 2014 Management Studio.

Don’t do driver updates

For a start, do not use WSUS to update drivers, You will bloat the WSUS database with updates. Let your deployment solution handle drivers, and if you need to update a driver (like say an Intel Wireless driver) push it out via a normal application install.

What if “someone” enable driver updates already? Well then use either PowerShell or SQL edits to delete them. The PowerShell command below will delete between 200 – 600 drivers per hour.

$wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer();
 $wsus.GetUpdates() | Where {$_.IsDeclined -eq $true} | ForEach-Object {$wsus.DeleteUpdate($_.Id.UpdateId.ToString()); Write-Host $_.Title removed }

If you can’t wait a few days to delete all drivers via PowerShell (last customer I run into had 65000 drivers added), you can use unsupported SQL edits to delete them in 10 seconds. Check this great post from Dennis Suhanovs:

How to Delete Driver Updates from WSUS

Deployment News

Happy deployment, and thanks for reading!

What our lawyers makes us say:

This information is provided "AS IS" with no warranties, confers no rights and is not supported by the authors or Deployment Artist.

Copyright © 2017 by Deployment Artist (the company behind deployment research). All rights reserved. No part of the information on this web site may be reproduced or posted in any form or by any means without the prior written permission of the publisher.

Shorthand: Don't pass off our work as yours, it's not nice.

Blog Archive


Where you can meet us!

Live Stream Recordings
ConfigMgr 1806 and W10 OSD

5 Days - Mega Geek Week 
(multiple classes, ConfigMgr, OSD etc.)
- Johan Arwidmark, Mikael Nystrom...
Jun 10, 2019, Chicago, IL, US

4 Days - Windows 10 OSD Classes
- Johan Arwidmark
May 20, 2019, San Diego, CA, US
Jun 17, 2019, Culemborg, NL
Jul 8, 2019, Phoenix, AZ, US

5 days - ConfigMgr Classes
- Johan Arwidmark and Kent Agerlund
Apr 8, 2019, Chicago, IL, US
Apr 22, 2019, Houston, TX, US

Video-based trainings

MDT, Windows 10 and ConfigMgr Books

Contact Info