# Create a large DNS database with 250 zones, and 250 records each zone = 62.5k records # To ensure it takes a good amount of time to initialize the DNS server # This will take like 5 minutes to run $numZones=250 $recordsPerZone=250 For ($i=0; $i -lt $numZones; $i++) { $zoneName = "Zone$i.home.stevenpolley.net" Add-DNSServerPrimaryZone -Name $zoneName -ReplicationScope Forest $progressPercent = $(($i*100)/$numZones) Write-Progress -Activity "Adding DNS Zones" -Status "$progressPercent% complete. Current zone: $zoneName" -PercentComplete $progressPercent For ($j=0; $j -lt $recordsPerZone; $j++) { $address = "10.69.$i.$j" Add-DnsServerResourceRecord -ZoneName $zoneName -A -Name "host$j" -IPv4Address $address -TimeToLive 01:00:00 -AgeRecord } } # Hammer the DNS server with queries While ($true) { & nslookup host55.zone50 2>&1 | Out-Null } # Cleanup DNS database For ($i=0; $i -lt $numZones; $i++) { $zoneName = "Zone$i.home.stevenpolley.net" Write-Host $zoneName Remove-DNSServerZone $zoneName -Force }