Jodie Gaver Jodie Gaver Working with Configuration Manager since Working with Configuration Manager since MCTS: Administering and Deploying System Center 2012 Configuration Manager - Windows Server 2008 Active Directory Configuration -MCP This Presentation: -Software Updates / WSUS Cleanup -Troubleshooting and log files
After time the updates begin to pile up…let’s find a way to manage them
1.Navigate to the All Software Updates node under Software Library, and search for all expired updates. 2. Under “Add Criteria” check “Expired” then “Add”, leave the default value as “Yes”, and click search.
3. The search results will include all of your expired updates, so simply select all updates in the list view (CTRL+A), right-click, and choose Edit Membership.
4.You will see a list of all Update Groups where any of the selected updates from the list view are members. Simply uncheck the selected check boxes. (If you haven’t done this, it could take awhile) 5.Click OK to remove all of the expired updates from the selected Update Groups, and they’ll be set for deletion
6. You can see expiration activity in logs, through wsyncmgr.log Look for a line in the log that looks like the following: 7. Expired updates still show up in the console, but they are marked as expired, and have the following icon showing this state: They will remain in the console for 7 days following expiration. 5. After 7 days, expired updates that are not associated with active deployments, are tomb-stoned. This means they are no longer visible in the UI Use wsyncmgr.log to view the removal of these updates: Deleting old expired updates... SMS_WSUS_SYNC_MANAGER 4/26/ :06:16 AM Deleted 80 expired updates SMS_WSUS_SYNC_MANAGER 4/26/ :06:20 AM Deleted 80 expired updates total SMS_WSUS_SYNC_MANAGER 4/26/ :06:20 AM
7 days later
Cleanup on the WSUS Sever * Recommended monthly, do not perform task during heavy load times (especially if you have never ran it) Open “Windows Server Update Services” on the server you have the SUP Role installed on Expand Update Services -> Server -> Options then select “Server Cleanup Wizard”
Choose what you want to cleanup If you have never done this, you may want to do a step or 2 at a time
Before starting WSUS Cleanup Wizard After starting WSUS Cleanup Wizard
After WSUS Server Cleanup Wizard is complete
…who does anything manually if they can automate it?
WSUS cleanup with Powershell in a Basic Scheduled Task On the WSUS Server, Create a Basic Task Name it something cool
Set the Start date, Time (not peak hours), Select All Months and Day(s) “Start a Program”
Create a Basic scheduled monthly task, Set the “Start a Program” to “Powershell”, paste the PS command into the Add Arguments box Get-WsusServer | Invoke-WsusServerCleanup -CleanupObsoleteComputers -CleanupObsoleteUpdates - CleanupUnneededContentFiles -CompressUpdates -DeclineExpiredUpdates -DeclineSupersededUpdates More on the Arguments here
“Run” if you don’t want to wait On the “History” tab you can see if it completed successfully
Troubleshooting Test it in PowerShell Or Bing it!!