How to setup and configure DNS from Command line in Windows Server 2008 & Core

If you're new here, you may want to subscribe to Windows Reference RSS feed Thanks for visiting!


With the coming of Windows Server 2008 Core, its time to go back to the good old days of command line. We can add the DNS Server role and add manage DNS Server including setting up Forward and Reverse Lookup zones from the command line.

The following procedure should help you to setup and Configure a DNS server in Windows Server 2008 & Windows Server 2008 Core installation:

Add DNS Server Role

C:\Users\Administrator> start /w ocsetup DNS-Server-Role

In Windows Server 2008 Core it is as follows

C:\Users\Administrator> start /w ocsetup DNS-Server-Core-Role

That installs the DNS Server role. We can now configure the DNS Server using the “dnscmd” utility.

Here we’ll see the basic configurations. For more detailed instructions of DNSCMD, click here

Add a Forward Lookup zone

For the primary domain, add a forward lookup zone as follows:

C:\Users\Administrator> dnscmd PRIMARY /zoneadd hq.wr.COM /primary /file hq.wr.COM.dns

Add a Reverse Lookup Zone

C:\Users\Administrator> dnscmd PRIMARY /zoneadd 0.168.192.in-addr.arpa

Add an “A” record for the domain

C:\Users\Administrator> dnscmd PRIMARY /recordadd hq.wr.COM @ A 192.168.0.5

Add Records

C:\Users\Administrator> dnscmd PRIMARY /recordadd hq.wr.COM dc1 CNAME hq.wr.COM
 

That should get you up and running on the DNS Servers. Refer to the above mentioned DNSCMD manual page for more advanced setup and configuration information.

  • Share/Bookmark

Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically each day to your feed reader.

No comments yet.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

(required)

(required)