{"id":27867770,"url":"https://github.com/ralish/pswsusspringclean","last_synced_at":"2025-05-04T22:53:34.159Z","repository":{"id":70963053,"uuid":"68185884","full_name":"ralish/PSWsusSpringClean","owner":"ralish","description":"Give your WSUS server a thorough spring cleaning","archived":false,"fork":false,"pushed_at":"2024-03-11T06:02:30.000Z","size":260,"stargazers_count":20,"open_issues_count":0,"forks_count":3,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-03-11T07:25:16.685Z","etag":null,"topics":["powershell","sysadmin","wsus"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ralish.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2016-09-14T07:55:54.000Z","updated_at":"2024-03-08T09:04:07.000Z","dependencies_parsed_at":"2023-12-10T01:42:08.972Z","dependency_job_id":null,"html_url":"https://github.com/ralish/PSWsusSpringClean","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ralish%2FPSWsusSpringClean","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ralish%2FPSWsusSpringClean/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ralish%2FPSWsusSpringClean/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ralish%2FPSWsusSpringClean/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ralish","download_url":"https://codeload.github.com/ralish/PSWsusSpringClean/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252411819,"owners_count":21743604,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["powershell","sysadmin","wsus"],"created_at":"2025-05-04T22:53:33.698Z","updated_at":"2025-05-04T22:53:34.141Z","avatar_url":"https://github.com/ralish.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"PSWsusSpringClean\n=================\n\n[![pwsh ver](https://img.shields.io/powershellgallery/v/PSWsusSpringClean)](https://www.powershellgallery.com/packages/PSWsusSpringClean)\n[![pwsh dl](https://img.shields.io/powershellgallery/dt/PSWsusSpringClean)](https://www.powershellgallery.com/packages/PSWsusSpringClean)\n[![license](https://img.shields.io/github/license/ralish/PSWsusSpringClean)](https://choosealicense.com/licenses/mit/)\n\nA PowerShell module to assist with cleaning-up superfluous updates in Windows Server Update Services (WSUS).\n\n- [The problem](#the-problem)\n- [The solution](#the-solution)\n- [Requirements](#requirements)\n- [Installing](#installing)\n- [Sample usage](#sample-usage)\n- [License](#license)\n\nThe problem\n-----------\n\nFor the cleanliness obsessed among us, maintaining a pristine WSUS catalogue of approved updates can be a tedious and time-consuming affair. While WSUS itself provides tools to help manage this process, via the graphical *Server Cleanup Wizard* and its PowerShell equivalent `Invoke-WsusServerCleanup`, these tools can only decline or delete updates which WSUS itself is already aware are obsolete via update metadata.\n\nUnfortunately, many updates are obsolete but lack the metadata to indicate as such, or are still current but may be unwanted (e.g. Itanium architecture updates). Manually maintaining an ever-increasing catalogue of updates while removing these unwanted updates rapidly becomes a timesink.\n\nThe solution\n------------\n\nThe `PSWsusSpringClean` module provides several additional options for cleaning your WSUS server:\n\n- Runs the default set of generally safe clean-up tasks (`-RunDefaultTasks`)  \n  This consists of all the `Invoke-WsusServerCleanup` tasks and all parameters of this cmdlet prefixed with `-Decline`.\n- Decline failover clustering updates (`-DeclineClusterUpdates`)  \n  Updates which only apply to **SQL Server 2000/2005** installations in a *failover clustering* configuration.\n- Decline farm server \u0026 deployment updates (`-DeclineFarmUpdates`)  \n  Updates which only apply to *Farm Server* products or product installations in a *farm-deployment* configuration.\n- Decline pre-release updates (`-DeclinePrereleaseUpdates`)  \n  Updates which only apply to pre-release products (e.g. release candidates).\n- Decline *Security Only Quality Updates* (`-DeclineSecurityOnlyUpdates`)  \n  Microsoft's new non-cumulative security only updates. The *Security Monthly Quality Rollups* contain everything in these updates and more.\n- Decline architecture specific updates (`-DeclineArchitectures`)  \n  Updates which are targeted to specific CPU architectures (e.g. Itanium or ARM64).\n- Decline language or region specific updates (`-DeclineLanguagesExclude` \u0026 `-DeclineLanguagesInclude`)  \n  Updates which are targeted to specific or regions (e.g. *Setswana* (`tn-ZA`)).\n- All parameters of `Invoke-WsusServerCleanup` for wrapping its functionality  \n  Consult the help of `Invoke-WsusServerCleanup` for a description of these tasks.\n\nSeveral additional parameters not related to declining updates are also provided:\n\n- Synchronise the WSUS server catalogue (`-SynchroniseServer`)  \n  A synchronisation will be performed before any requested clean-up actions.\n- Flag for review updates which may be incorrectly declined (`-FindSuspectDeclines`)  \n  Lists updates which may be incorrectly declined. See the [Suspect Declines](#suspect-declines) section for more details.\n\n### Unneeded Updates\n\nThere are many updates which are likely unwanted in WSUS installations but have no obvious indicator in the metadata which can be used to detect them. To handle these updates a CSV file of categorised potentially unneeded updates is included with this module and can be used to selectively decline listed updates based on their associated category. The CSV file can be easily imported into a spreadsheet application of your choice to review the provided categories and associated updates or make changes.\n\nTwo parameters are provided to indicate to the module which unneeded updates should be declined:\n\n- Decline only the updates in the listed categories (`-DeclineCategoriesInclude`) [**Default**]  \n  An array of strings corresponding to the categories of unneeded updates to be declined. If an empty array is provided (default) then *no* updates listed in the CSV will be declined.\n- Decline all unneeded updates except those in the listed categories (`-DeclineCategoriesExclude`)  \n  An array of strings corresponding to the categories of unneeded updates to exclude from declining. If an empty array is provided then **all** updates listed in the CSV will be declined!\n\nThe `-DeclineCategoriesExclude` parameter should be used with caution as it could easily decline updates you did not intend to!\n\n### Suspect Declines\n\nThe module also provides a function to identify updates which may have been inadvertently declined via the `-FindSuspectDeclines` parameter. This will identify all declined updates which meet all of the following criteria:\n\n- Are not superseded\n- Are not expired\n- Would not have been declined by this module based on the provided parameters\n\nThis can also be used to assist in reverting declines that were unintentionally made via an earlier invocation of this module with incorrect parameters.\n\nRequirements\n------------\n\n- PowerShell 3.0 (or later)\n- `UpdateServices` module (included with WSUS)\n\nInstalling\n----------\n\n### PowerShellGet (included with PowerShell 5.0)\n\nThe module is published to the [PowerShell Gallery](https://www.powershellgallery.com/packages/PSWsusSpringClean):\n\n```posh\nInstall-Module -Name PSWsusSpringClean\n```\n\n### ZIP File\n\nDownload the [ZIP file](https://github.com/ralish/PSWsusSpringClean/archive/stable.zip) of the latest release and unpack it to one of the following locations:\n\n- Current user: `C:\\Users\\\u003cyour.account\u003e\\Documents\\WindowsPowerShell\\Modules\\PSWsusSpringClean`\n- All users: `C:\\Program Files\\WindowsPowerShell\\Modules\\PSWsusSpringClean`\n\n### Git Clone\n\nYou can also clone the repository into one of the above locations if you'd like the ability to easily update it via Git.\n\n### Did it work?\n\nYou can check that PowerShell is able to locate the module by running the following at a PowerShell prompt:\n\n```posh\nGet-Module PSWsusSpringClean -ListAvailable\n```\n\nSample usage\n------------\n\n```posh\n# Runs the default clean-up tasks \u0026 checks for declined updates that may not be intentional\n$SuspectDeclines = Invoke-WsusSpringClean -RunDefaultTasks -FindSuspectDeclines\n\n# Declines all unneeded updates in the \"Region - US\" \u0026 \"Superseded\" categories\nInvoke-WsusSpringClean -DeclineCategoriesInclude @('Region - US', 'Superseded')\n\n# Declines all language specific updates excluding those for English (Australia)\nInvoke-WsusSpringClean -DeclineLanguagesExclude @('en-AU')\n\n# Declines all architecture specific updates for ARM64 \u0026 IA64 (Itanium) systems\nInvoke-WsusSpringClean -DeclineArchitectures @('arm64', 'ia64')\n```\n\nLicense\n-------\n\nAll content is licensed under the terms of [The MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fralish%2Fpswsusspringclean","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fralish%2Fpswsusspringclean","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fralish%2Fpswsusspringclean/lists"}