Question : DNS zone ip and ttl changes

I have a server 2003 dns server hosting zones for approx 1000 websites. My Ip space has changed and I need to change the 1000 zone files with the least amount of effort. Does anybody have a wayto change these files, I have tried dnscommand but am unable to get switches.

Answer : DNS zone ip and ttl changes


If you grab PowerShell from here:

http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx

Doesn't have to be installed on the DNS server itself, just somewhere we can get a connection (that needs RPC connectivity).

Now we can run things like this...

$NewMinimumTTL = "28800" # 8 hours, in seconds
Get-WMIObject -Namespace "root\MicrosoftDNS" -Class "MicrosoftDNS_SOAType" `
  -ComputerName "TheDNSServer" | %{

  $_.Modify($Null, $Null, $Null, $Null, $Null, $Null, $Null, $NewMinimumTTL) }

Which would update the SOA record for every zone on the server. Obviously you'll want a bit of a chance to test this, so perhaps we can play with a single zone:

$ZoneName = "TestZone.com"
Get-WMIObject -Namespace "root\MicrosoftDNS" -Class "MicrosoftDNS_SOAType" `
  -ComputerName "TheDNSServer" -Filter "ContainerName='$ZoneName'" | %{

  $_.Modify($Null, $Null, $Null, $Null, $Null, $Null, $Null, $NewMinimumTTL) }

Chris
Random Solutions  
 
programming4us programming4us