Thorough testing is crucial to ensure your DNS zone restoration was successful and all services are functioning correctly. This step prevents service disruptions and identifies any issues before users are affected.
Test basic DNS resolution from the local server:
# Test basic A record resolution
nslookup contoso.com localhost
nslookup www.contoso.com localhost
# Test using PowerShell DNS cmdlets
Resolve-DnsName -Name "contoso.com" -Type A -Server localhost
Resolve-DnsName -Name "www.contoso.com" -Type A -Server localhost
# Test MX records for email
Resolve-DnsName -Name "contoso.com" -Type MX -Server localhost
# Test SRV records for services
Resolve-DnsName -Name "_sip._tcp.contoso.com" -Type SRV -Server localhost
Resolve-DnsName -Name "_ldap._tcp.contoso.com" -Type SRV -Server localhost
Test DNS resolution from remote clients:
# Test from a remote client (replace with actual client IP)
$clientIP = "192.168.1.100"
Test-NetConnection -ComputerName $clientIP -Port 53
# Use Invoke-Command to test from remote systems
$credential = Get-Credential
Invoke-Command -ComputerName $clientIP -Credential $credential -ScriptBlock {
nslookup contoso.com
Resolve-DnsName -Name "contoso.com" -Type A
}
Perform comprehensive DNS functionality tests:
# Test zone transfer functionality
Get-DnsServerZoneTransfer -Name "contoso.com"
# Test dynamic updates (if enabled)
$testRecord = "test-" + (Get-Date -Format "yyyyMMdd-HHmmss")
Add-DnsServerResourceRecordA -ZoneName "contoso.com" -Name $testRecord -IPv4Address "192.168.1.99" -CreatePtr
# Verify the test record was created
Resolve-DnsName -Name "$testRecord.contoso.com" -Type A
# Clean up test record
Remove-DnsServerResourceRecord -ZoneName "contoso.com" -Name $testRecord -RRType A -Force
Monitor DNS server performance and statistics:
# Check DNS server statistics
Get-DnsServerStatistics | Select-Object TotalQueries, TotalResponses, RecursiveQueries
# Monitor DNS server event logs
Get-WinEvent -LogName "DNS Server" -MaxEvents 10 | Select-Object TimeCreated, Id, LevelDisplayName, Message
# Check zone-specific statistics
Get-DnsServerZone -Name "contoso.com" | Select-Object ZoneName, ZoneType, IsDsIntegrated, IsAutoCreated
Warning: If any DNS tests fail, do not proceed to production use. Investigate and resolve issues immediately, as DNS failures can cause widespread service disruptions.
Verification: All DNS resolution tests should return expected results, and no errors should appear in the DNS Server event log. Run Get-WinEvent -LogName "DNS Server" -Level Error -MaxEvents 5 to check for recent errors.