Created
May 12, 2017 09:54
-
-
Save kamilkosek/5b0c4165a818fa690edc654185a13c78 to your computer and use it in GitHub Desktop.
WSUS 0x8024000d Error with Windows 10 1703
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Since Windows 10 1703 clients got issues while connecting to a WSUS Server | |
# with 3rd party update, I decided to remove the updates so the categories will disappear | |
# In our case there were updates which were injected by secunia csi. | |
$updateServer = 'wsus-02' | |
[Boolean]$useSecureConnection = $False | |
[Int32]$portNumber = 8530 | |
$null = [reflection.assembly]::LoadWithPartialName('Microsoft.UpdateServices.Administration') | |
$Wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::getUpdateServer($updateServer,$useSecureConnection,$portNumber) | |
$other = $wsus.GetUpdateCategories() | Where-Object {$_.UpdateSource -eq 'other'} | |
"Got $($other.Count) categories" | |
"getting udpates ...." | |
$updates = $other | ForEach-Object{$_.GetUpdates()} | |
"Got $($updates.Count) from 'other' Update sources" | |
"declinging them..." | |
$updates | ForEach-Object {$_.Decline()} | |
"trying to delete them" | |
$updates | ForEach-Object {$wsus.DeleteUpdate($_.Id.UpdateId)} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment