Search This Blog

Wednesday, July 06, 2011

Win2k8: Change primary dns suffix from command line

A quick one here,  I needed to add dns suffix to some servers that were not in a domain. The servers were all in a WORKGROUP.

I was adding a dns entry to the dns server, so I could get rid of the legacy dependence on host files, which were a nightmare to manage.

So I needed a command that allowed me to do this, and I could then run remotely. The command is netdom, and does other things but below I show how to use it to change the primary dns suffix. The primary dns suffix can be manually changed in windows by going to

  • Control Panel
  • System
  • “Change Settings” (under Computer Name section)
  • “Change”
  • “More”

Example:

    • Servername: TestServer
    • DNS Suffix: testsub.test

netdom computername TestServer /add:TestServer .testsub.test

netdom computername TestServer /makeprimary:TestServer .testsub.test


Share/Bookmark

No comments:

Post a Comment