How to script & automate simple Windows DNS change?

Posted on 2007-07-20
Last Modified: 2010-04-21
I have to make a DNS change at a certain time - say 9:00 PM tonight ;).  It's simply changing a cname to point to a different FQDN.

So, lets say I want to change  to go from to instead point to

I know nothing about scripting, but shirley ( ;)) this is simple to do and automate?  How to do it please, in simple network engineer (not Windows engineer) terms ... ;)

DNS server is Windows 2003 server.  Normally I use MMC to do IP Address Management.  
Question by:pseudocyber
    LVL 26

    Accepted Solution

    Greetings pseudocyber,

    You can do this by using 'Dnscmd' command line utility comes with Windows 2000 support tools.
    DNSCmd.exe <DNSServerIP/Name> /RecordAdd <ZoneName> <CNameToDelete> CNAME <FQDN>

    Make a 2 batch files with following code schedule them with with Scheduled Tasks.

    DNSCmd.exe /RecordAdd CNAME

    DNSCmd.exe /RecordAdd CNAME

    For more info visit:

    To download Windows 2000 support tools visit:

    Hope this helps
    LVL 26

    Expert Comment

    Sorry typo mistake:
    DNSCmd.exe <DNSServerIP/Name> /RecordAdd <ZoneName> <CNameToAdd/Change> CNAME <FQDN>
    LVL 26

    Expert Comment

    Any update pseudocyber?
    LVL 27

    Author Closing Comment


    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!

    Join & Write a Comment

    Our Group Policy work started with Small Business Server in 2000. Microsoft gave us an excellent OU and GPO model in subsequent SBS editions that utilized WMI filters, OU linking, and VBS scripts. These are some of experiences plus our spending a lo…
    Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
    Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
    The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

    745 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

    18 Experts available now in Live!

    Get 1:1 Help Now