Skip to content

Instantly share code, notes, and snippets.

@kamilkosek
Created May 12, 2017 09:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kamilkosek/5b0c4165a818fa690edc654185a13c78 to your computer and use it in GitHub Desktop.
Save kamilkosek/5b0c4165a818fa690edc654185a13c78 to your computer and use it in GitHub Desktop.
WSUS 0x8024000d Error with Windows 10 1703
# 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