You are here: Sysadmins of the North » Windows Server » Remove computer object from Windows Server Update Services (WSUS) in PowerShell

Remove computer object from Windows Server Update Services (WSUS) in PowerShell

Here is a short PowerShell snippet for you to remove a computer object from Windows Server Update Services (WSUS). In an elevated PowerShell session, adjust the following to your environment and execute:

$WSUS_server = 'wsus-srv-01'
$UseSSL = $True
$Port = 8531

[reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration") | Out-Null
$Wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer($WSUS_server,$UseSSL,$Port)

$client = $wsus.SearchComputerTargets("srv-01")
$client.delete()Code language: PHP (php)

This removes the server named “srv-01” computer object from WSUS on host wsus-srv-01.

Show Your Support

donate with Paypal

If you want to step in to help me cover the costs for running this website, that would be awesome. Just use this link to donate a cup of coffee ☕($10 USD or €10 EUR for example). And please share the love and help others make use of this website. Thank you very much! <3 ❤️

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top