locked
WSUS 0MB cleaned updates, large wsus folder RRS feed

  • Question

  • Hello,

    I have some "problem" with WSUS Server - it ocurred few months ago (probably after I've deleted Office 2010 updates from list). At the moment we have turned on (critical, definition, security, update rollups & updates) for:

    • Office 2013 updates
    • MS SQL Server 2012 & 2014 (also product updates for 2012 + SQL Server Feature pack)
    • Windows 7
    • Windows Server 2008 R2
    • Windows Server 2012 R2
    • Windows Server Manager (WSUS Dynamic Installer)

    The problem is, that when I go to WSUS Client, and want to clean WSUS server (after 2-3 months) it founds for example only 10-16 updates for delete, and recovered disk space after cleaning is mostly 0 MB (I have checked all options in the Cleaning Wizard except, Computers not contacting the server).

    I also have checked option to Automatically decline updates, when a new revision causes them to exprie.

    WSUS Update folder now has 232GB size, which is quite large, when comparing to other people, that have more updates/products checked.

    Thursday, October 5, 2017 8:19 AM

Answers

  • You need my script. The SCW has it's place, but it is a joke how they've named it a 'clean-up wizard'

    Have a peek at my Adamj Clean-WSUS script. It is the last WSUS Script you will ever need!

    http://community.spiceworks.com/scripts/show/2998-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

    • Proposed as answer by Yan Li_ Monday, October 9, 2017 9:55 AM
    • Marked as answer by DW.mayr Thursday, December 28, 2017 11:29 AM
    Thursday, October 5, 2017 12:41 PM

All replies

  • You need my script. The SCW has it's place, but it is a joke how they've named it a 'clean-up wizard'

    Have a peek at my Adamj Clean-WSUS script. It is the last WSUS Script you will ever need!

    http://community.spiceworks.com/scripts/show/2998-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

    • Proposed as answer by Yan Li_ Monday, October 9, 2017 9:55 AM
    • Marked as answer by DW.mayr Thursday, December 28, 2017 11:29 AM
    Thursday, October 5, 2017 12:41 PM
  • Great, thank you for reply. I'll try this script in next maintenance window :)
    Monday, October 9, 2017 9:20 AM
  • Hello,

    Just checking to see any further assistance needed? 

    Have you tried the script suggested by Adam? What is the current status?

    If you still have issue, please feel free to post back. If the reply solved your issue, please remember to mark it as answer. 

    Thanks,

    Yan


    Please remember to mark the replies as answers if they help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Tuesday, October 17, 2017 6:20 AM
  • Forgot to reply. This is script is awesome!
    Stats: DiskSpaceFreed (GB): 201.15

    Thank you Adam!

    Thursday, December 28, 2017 11:30 AM
  • You're welcome! Glad to hear that it's working well for you.

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

    Thursday, December 28, 2017 12:46 PM