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()
This removes the server named "srv-01" computer object from WSUS on host wsus-srv-01.
Thank you very much! <3 ❤️
Hi, my name is Jan. I am not a hacker, coder, developer or guru. I am merely an application manager / systems administrator, doing my daily thing at Embrace – The Human Cloud. In the past I worked at CLDIN (CLouDINfra) and Vevida. With over 20 years of experience, my specialties include Windows Server, IIS, Linux (CentOS, Debian), security, PHP, websites & optimization. I blog at https://www.saotn.org.