Update Microsoft DNS records with PowerShell and DNSCMD

This script was built to be able to create and update DNS records in a Microsoft DNS environment. Because there is no native PowerShell CmdLet for updating DNS records I make use of the DNSCMD command line tool and use PowerShell to parse my input file and pass the parameters to

4.1 Star
8,002 times
Add to favorites
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question

  • Link is down, was able to find it here:
    2 Posts | Last post October 12, 2018
    • https://discoposse.com/2012/05/15/microsoft-dns-record-updates-using-powershell-and-dnscmd/
      I appreciate the post. 
    • Oops, I see that the above link was made prior to the updated (link down) post. Still good info there. 
  • delete and add a record in a subdomain
    1 Posts | Last post August 11, 2014
    • I am using this script to change records for a dr scenario and it works well on the 1st level records in zone, i.e. "xyz.com, test, A," However, I have 1 entry in a subdomain, A record "ftp.123.xyz.com"
      There are other records in this subdomain that will not be changed.
      How would I accomplish changing this record?
  • CSV structure?
    3 Posts | Last post November 29, 2013
    • Great!
      How the CSV looks like? What is the structure of it?
      Is there sample csv available?
    • Ok, I got it:
    • Glad you found it Molni. Hope the script is able to work for you and save some time :)
  • PTR Record
    2 Posts | Last post September 28, 2012
    • Hi,
      Great script and very usefull for me. Any idea how could I include PTR records?
    • Hi Lakend,
      For updating PTR records you simply make the TYPE column in the txt file as PTR instead of A or CNAME and you will be good to go!
      For a full list of options you can type DNSCMD /RECORDADD /? and it will give you all if the RRType options.
      Let me know if that works or if you need any more information.