Change Primary DNS Suffix
-
Wednesday, January 02, 2008 5:39 AM
I am trying to change the 'Primary DNS Suffix' on a Core installation (RC1 v735 Hyper-V Build)
Essentially I have two machines one GUI and one CORE
GUI
C:\>ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : w2k8gui
Primary Dns Suffix . . . . . . : mydomain.com
Node Type . . . . . . . . . . . . .: Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . : No
DNS Suffix Search List. . . . . : mydomain.comCORE
C:\>ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : w2k8core
Primary Dns Suffix . . . . . . :
Node Type . . . . . . . . . . . . .: Hybrid
IP Routing Enabled. . . . . . . : No
WINS Proxy Enabled. . . . . : No
In the GUI install you would open
-> 'System Properties'
-> 'Computer Name'
-> 'Change'
-> 'More'
And then add the FQDN name i.e. mydomain.com to the 'Primary DNS Suffix of this computer' and click the OK's and restart the computer and it is done.
Now I am trying to get the same results in IPCONFIG for both the GUI & Core installs.
I have been hunting down command line options for NETSH.EXE and NETDOM.EXE and how to do this but have not found the right switch yet. Neither of these machines are joined to a domain and are both only in a workgroup named 'Workgroup' and I do not want to join them to a DC yet.
So can anyone give me a hand in what I should do on the CORE install that is the equivelent steps for the GUI instructions above?
Cheers,
Stephen Edgar
All Replies
-
Wednesday, January 02, 2008 9:15 AM
It's true NetSh and NetDom don't offer commands to change the DNS suffix.
I can think of two ways to change the suffix though:
-
Using Regedit
The primary DNS suffix is stored in the registry in the following location:
HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Paramaters
You might want to change the values for the following registry keys:
-
Domain (REG_SZ)
-
SearchList (REG_SZ)
-
-
Using Group Policy
Since you don't want to join your servers to a domain you can't use Group Policies with an Active Directory source, but you will still be able to change the Local Policies with ease, although it won't be pretty security-wise
-
Log on to a Windows Vista or Windows Server 2008 box with an Administrator account with the exact same password as the Administrator account on the Server Core box
-
Run gpedit.msc
-
Open the Computer Policy
-
(Open Policies)
-
Open Administrative Templates
-
Open Network
-
Open DNS Client
-
Double click the "Primary DNS Suffix" policy
-
Enable the "Primary DNS Suffix" policy and type your suffix
-
Press OK
-
Open the "DNS Suffix Search Order" policy
-
Enable the "DNS Suffix Search Order" and type your suffixes
-
Press OK
-
Log on the Server Core box
-
Perform the following command:
gpupdate
The settings from your Local Policy should take effect.
You might want to consider running ipconfig /registerdns after changing the Primary DNS Suffix.
-
-
Wednesday, February 25, 2009 9:55 AM
The third way is:
netdom computername w2k8core /MakePrimary:w2k8core.mydomain.com- Proposed As Answer by Adam Paradis Wednesday, May 20, 2009 10:46 PM
-
Friday, April 09, 2010 12:15 AM
I like the netdom command better than messing with little known or maybe undocumnted registry values, but when I tried it on Hyper-V Server R2 it said
Unable to make <FQDN>
the primary name for the computer.
The error is:Try "NETDOM HELP" for more information.
Is that for full Windows only or should it work on Hyper-V Server R2?
-
Monday, December 27, 2010 9:58 AM
netdom computername hostname.domain.com /add:newhostname.newdomain.com
netdom computername hostname.domain.com /makeprimary:newhostname.newdomain.com
netdom computername newhostname.newdomain.com /remove:oldmachine.domain.comIf it is newly installed machine
netdom renamecomputer %computername% /Newname:2008R2core
netdom computername %computername% /makeprimary:%computername%.testdomain.com
- Proposed As Answer by Sarith Monday, December 27, 2010 10:01 AM
-
Saturday, August 20, 2011 11:18 AM
I was searching for this myself. For workgroup computers, I came to this final solution:
Computername = WGServer01
Desired Primary DNS Suffix = mydomain.comFirst add the FQDN of the computer:
netdom computername WGServer01 /Add:WGServer01.mydomain.com
Second make the the just add FQDN of the computer the primary:
netdom computername WGServer01 /MakePrimary:WGServer01.mydomain.comIf you only try to perform the second step without the firt you'll get the error:
Unable to make <FQDN>
the primary name for the computer.
The error is:
Try "NETDOM HELP" for more information.- Proposed As Answer by Byron Obando Monday, July 16, 2012 11:20 PM
-
Wednesday, August 22, 2012 1:09 PM
To be precise: the "Primary DNS Suffic" policy requires reboot to be applied.
bye
Dario Palermo

