• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 814
  • Last Modified:

Scripting a change to an existing DNS record on a DNS server

Hi

As part of our DR solution using Wansync, we would like to create a script that changes the IP address of a host (A) record. Preferably VBScript - looked at the script repository on Microsoft.com, couldnt see one that matches.


Many thanks
0
5t34lth_G33k
Asked:
5t34lth_G33k
2 Solutions
 
HaddionCommented:
You can use the dnscmd command, from the Windows Support Tools (on the Windows 2003 CD) to add/remove DNS records.

I can go into syntax if you'd like, but I assume you're happy reading /? if you've been looking through vbs.
0
 
MSE-dwellsCommented:
Obtain a copy of DNSCMD.EXE if it's not already present (it's part of the Support Tools) and use the following syntax -

dnscmd mydnserver.home.local /recorddelete mydnszone.local myhostname A 172.31.0.3 /f
dnscmd mydnserver.home.local /recordadd  mydnszone.local myhostname A 172.31.0.4

... the /recorddelete isn't mandatory but note that the /recordadd will add a new record, not overwrite the original ... thus the delete statement ... your call though.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now