Photo by Pixabay on

Build List of DNS Record and paste those on your Desktop and put each record in line

Run this to change TTL Value to 10 Minutes

$records = get-content $home\desktop\eachrecord.txt | %{Get-DnsServerResourceRecord -Name $_ -ZoneName <DNSZone> -RRType "A" -ComputerName <DNSServerHost>}
foreach ($eachrecord in $records)
# update TTL Value of a record
$TTL = [System.TimeSpan]::FromMinutes(10)
$old = $eachrecord
$new = $old.clone()
$new.TimeToLive = $TTL
Set-DnsServerResourceRecord -ComputerName <DNSServerHost> -Old $old -New $new -ZoneName ""
Write-Host "Modified" $old.HostName "DNS Record in DNS Zone" -ForegroundColor Yellow

Thank you for reading !