WSUS (Server 2016) and powershell
I find myself in powershell more often that not these days, and sometimes using the GUI can be painfully slow or time-out.
Firing up the homelab, I found this happening with WSUS. It had a lot of updates to chew through even though the VM had only been switched off for a couple of months.
Step up powershell!
Show all the commands available in the Update Services module
Thats should do a cleanup.
Kick of a sync and show the progress
Currently this is failing and I've still to check out why - the error claims "SoapException: Fault occurred InvalidCookie"
More on that after some lunch!
Update: After fixing lunch for jr and him deciding to have all the soup, it got me thinking about cookies. I reset IE zones (IE internet options -> reset all zones to default level) and all is well.
If it had failed again, the next step would be to clear IE cookies
Firing up the homelab, I found this happening with WSUS. It had a lot of updates to chew through even though the VM had only been switched off for a couple of months.
Step up powershell!
Show all the commands available in the Update Services module
Get-Command -Module UpdateServices
Invoke-WsusServerCleanup -CleanupObsoleteUpdates -CleanupUnneededContentFiles -DeclineExpiredUpdates -DeclineSupersededUpdates -Verbose
Thats should do a cleanup.
Kick of a sync and show the progress
(Get-WsusServer).GetSubscription().StartSynchronization() (Get-WsusServer).GetSubscription().GetSynchronizationProgress()
Currently this is failing and I've still to check out why - the error claims "SoapException: Fault occurred InvalidCookie"
More on that after some lunch!
Update: After fixing lunch for jr and him deciding to have all the soup, it got me thinking about cookies. I reset IE zones (IE internet options -> reset all zones to default level) and all is well.
If it had failed again, the next step would be to clear IE cookies
Comments
Post a Comment