$wsusFQDN = 'WSUSSERVER01.contoso.com'
$wsusserver = Get-WsusServer -UseSsl -PortNumber 8531 -Name $wsusFQDN # WSUS Server FQDN
$ungroupservers = Get-WsusComputer -UpdateServer $wsusserver -ComputerTargetGroups 'Unassigned Computers' | select FullDomainName,IPAddress,OSDescription,ComputerRole,LastSyncTime,LastSyncResult,LastReportedStatusTime
#Add WSUS agent to WSUS defined group
Get-WsusComputer -UpdateServer $wsusserver -NameIncludes $serverfqdn | Add-WsusComputer -TargetGroupName 'BeiJingServers' -Confirm:$false
标签:Get,WsusComputer,Add,wsusserver,WSUS,分组,Powershell,UpdateServer
From: https://blog.51cto.com/u_11333879/7970111