locked
Reduce the number of Synchronization entries in the WSUS console RRS feed

  • Question

  • I run WSUS 4.0 (Server 2012 R2), I have not found a way from within WSUS to manually remove some of the Synchronization history, or at least tell it to only keep x amount of days...I don't need 60+ days. I assume it will just keeping growing forever as the syncs run each day, a bit surprised you can't do this from within the console?

    I am using WID for the database type, not SQL. So, I guess this means a script that says something to the affect of get rid of all but the last 45 days of synchronization (I don't want them all deleted)? So far the stuff I have read discusses how to get rid of all the sync entries - https://blogs.technet.microsoft.com/sus/2009/03/04/clearing-the-synchronization-history-in-the-wsus-console/

    There is an entry in the comments in the article above that talks about how to limit what gets deleted, but some said that didn't work.

    Tuesday, January 30, 2018 2:52 AM

Answers

All replies

  • Install SQL Express on WSUS server.

    Then connect WID Database(WSUS DB) Using SQL. (\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query )

    Then run that queries.

    If all are deleted, After Syncing new entries will be available there.

    If you are not happy with SQL querying, Try with powershell,

    Refer below,

    http://www.madwithpowershell.com/2013/10/clean-up-wsus-synchronization-reporting.html

    Tuesday, January 30, 2018 3:48 AM
  • WAM it! (WAM takes care of that and more!)

    Please have a look at the WSUS Automated Maintenance (WAM) system. It is an automated maintenance system for WSUS, the last system you'll ever need to maintain WSUS!

    https://community.spiceworks.com/scripts/show/2998-wsus-automated-maintenance-formerly-adamj-clean-wsus

    What it does:

    1. Add WSUS Index Optimization to the database to increase the speed of many database operations in WSUS by approximately 1000-1500 times faster.
    2. Remove all Drivers from the WSUS Database (Default; Optional).
    3. Shrink your WSUSContent folder's size by declining multiple types of updates including by default any superseded updates, preview updates, expired updates, Itanium updates, and beta updates. Optional extras: Language Packs, IE7, IE8, IE9, IE10, Embedded, NonEnglishUpdates, ComputerUpdates32bit, WinXP.
    4. Remove declined updates from the WSUS Database.
    5. Clean out all the synchronization logs that have built up over time (configurable, with the default keeping the last 14 days of logs).
    6. Compress Update Revisions.
    7. Remove Obsolete Updates.
    8. Computer Object Cleanup (configurable, with the default of deleting computer objects that have not synced within 30 days).
    9. Application Pool Memory Configuration to display the current private memory limit and easily set it to any configurable amount including 0 for unlimited. This is a manual execution only.
    10. Checks to see if you have a dirty database, and if you do, fixes it. This is primarily for Server 2012 WSUS, and is a manual execution only.
    11. Run the Recommended SQL database Maintenance script on the actual SQL database.
    12. Run the Server Cleanup Wizard.

    It will email the report out to you or save it to a file, or both.

    Although the script is lengthy, it has been made to be super easy to setup and use so don't over think it. There are some prerequisites and instructions at the top of the script. After installing the prerequisites and configuring the variables for your environment (email settings only if you are accepting all the defaults), simply run:

    .\Clean-WSUS.ps1 -FirstRun

    If you wish to view or increase the Application Pool Memory Configuration, or run the Dirty Database Check, you must run it with the required switch. See Get-Help .\Clean-WSUS.ps1 -Examples

    If you're having trouble, there's also a -HelpMe option that will create a log so you can send it to me for support.


    Adam Marshall, MCSE: Security
    http://www.adamj.org
    Microsoft MVP - Windows and Devices for IT

    Tuesday, January 30, 2018 4:05 AM
  • Am 30.01.2018 schrieb Jack Leidu:

    I run WSUS 4.0 (Server 2012 R2), I have not found a way from within WSUS to manually remove some of the Synchronization history, or at least tell it to only keep x amount of days...I don't need 60+ days. I assume it will just keeping growing forever as the syncs run each day, a bit surprised you can't do this from within the console?

    Right, this i'm missing in Options. ;)

    I am using WID for the database type, not SQL. So, I guess this means a script that says something to the affect of get rid of all but the last 45 days of synchronization (I don't want them all deleted)? So far the stuff I have read discusses how to get rid of all the sync entries - https://blogs.technet.microsoft.com/sus/2009/03/04/clearing-the-synchronization-history-in-the-wsus-console/

    There is an entry in the comments in the article above that talks about how to limit what gets deleted, but some said that didn't work.

    Install the latest SQL Server Management Studio you get and run one of
    the Scripts in the Blog Article you postet.
    https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms

    Now you can run your Script Daily or weekly. And yes, you can create a
    batch and run the script daily or weekly in Taskplaner.

    Winfried


    WSUS Package Publisher: http://wsuspackagepublisher.codeplex.com/
    http://technet.microsoft.com/en-us/windowsserver/bb332157.aspx
    http://www.wsuswiki.com/Home

    • Marked as answer by Jack Leidu Tuesday, January 30, 2018 3:51 PM
    Tuesday, January 30, 2018 8:11 AM
  • I had to use \\.\pipe\MICROSOFT##WID\tsql\query in order to connect to the WID since this is 2012 R2. Also, I had to launch MS SQL Server Management Studio using the "Run as administrator" option.
    Tuesday, January 30, 2018 3:51 PM
  • I had to use \\.\pipe\MICROSOFT##WID\tsql\query in order to connect to the WID since this is 2012 R2. Also, I had to launch MS SQL Server Management Studio using the "Run as administrator" option.
    Tuesday, January 30, 2018 3:51 PM