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

Photo of author
Written By Jan Reilink

Windows Server system administrator & enthusiast.

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.


Did you like: Remove computer object from Windows Server Update Services (WSUS) in PowerShell

Then please, take a second to support Sysadmins of the North and donate!

Your generosity helps pay for the ongoing costs associated with running this website like coffee, hosting services, library mirrors, domain renewals, time for article research, and coffee, just to name a few.



Hi! Join the discussion, leave a reply!