Windows Server Update Services (WSUS) Powershell Commands: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
[[Category:Windows]] | |||
==General WSUS Server Maintennace== | ==General WSUS Server Maintennace== | ||
Run all WSUS clean up routines | |||
Get-WsusServer | Invoke-WsusServerCleanup -CleanupObsoleteComputers -CleanupObsoleteUpdates -CleanupUnneededContentFiles -CompressUpdates -DeclineExpiredUpdates -DeclineSupersededUpdates -Confirm:$false | Get-WsusServer | Invoke-WsusServerCleanup -CleanupObsoleteComputers -CleanupObsoleteUpdates -CleanupUnneededContentFiles -CompressUpdates -DeclineExpiredUpdates -DeclineSupersededUpdates -Confirm:$false | ||
| Line 8: | Line 10: | ||
Remove specific product from being syncronized | Remove specific product from being syncronized | ||
Get-WsusProduct -TitleIncludes "Microsoft SQL Server 2017" | Set-WsusProduct -Disable -Verbose | Get-WsusProduct -TitleIncludes "Microsoft SQL Server 2017" | Set-WsusProduct -Disable -Verbose | ||
Invoke a synchronization | |||
(Get-WsusServer).GetSubscription().StartSynchronization() | |||
Latest revision as of 13:08, 30 May 2020
General WSUS Server Maintennace
Run all WSUS clean up routines
Get-WsusServer | Invoke-WsusServerCleanup -CleanupObsoleteComputers -CleanupObsoleteUpdates -CleanupUnneededContentFiles -CompressUpdates -DeclineExpiredUpdates -DeclineSupersededUpdates -Confirm:$false
Products Management
Add specific products to be syncronized
Get-WsusProduct -TitleIncludes "SQL" Get-WsusProduct -TitleIncludes "Microsoft SQL Server 2017" | Set-WsusProduct -Verbose
Remove specific product from being syncronized
Get-WsusProduct -TitleIncludes "Microsoft SQL Server 2017" | Set-WsusProduct -Disable -Verbose
Invoke a synchronization
(Get-WsusServer).GetSubscription().StartSynchronization()