Finding WSUS Clients by SusClientId | BackSlasher

PHOTO EMBED

Thu Aug 25 2022 10:34:27 GMT+0000 (Coordinated Universal Time)

Saved by @D_GEIGER

param(
    [uri]$wsusUri = 'https://WSUS-Server:443',
    $ComputerName = 'OtherServer'
)
$wsus = Get-WsusServer $wsusUri.Host -PortNumber $wsusUri.Port -UseSsl:($wsusUri.Scheme -eq 'https')
$baseKey = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine',$ComputerName);
$key = $baseKey.OpenSubKey('SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate');
$id = $key.GetValue('SusClientId')
$wsus.GetComputerTarget($id).FullDomainName
content_copyCOPY

https://blog.backslasher.net/finding-wsus-clients-by-susclientid.html