Отсканировать DNS имена в цикле
foreach ($i in 0..20){
Resolve-DnsName "site-$($i.ToString("00")).example.com"|`
Where-Object -Property Section -eq "Answer"|`
select IP4Address,name
}
foreach ($i in 0..20){
Resolve-DnsName "site-$($i.ToString("00")).example.com"|`
Where-Object -Property Section -eq "Answer"|`
select IP4Address,name
}