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

Posted on 2007-10-11
Last Modified: 2008-01-09

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, couldnt see one that matches.

Many thanks
Question by:5t34lth_G33k
    LVL 5

    Accepted Solution

    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.
    LVL 9

    Assisted Solution

    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 /f
    dnscmd mydnserver.home.local /recordadd  mydnszone.local myhostname A

    ... 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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Many of us need to configure DHCP server(s) in their environment. We can do that simply via DHCP console on server or using MMC snap-in on each computer with Administrative Tools installed in a network. But what if we have to configure many DHCP ser…
    A quick step-by-step overview of installing and configuring Carbonite Server Backup.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now