Uncheck “Change Primary DNS suffix when domain membership changes” using script.

Posted on 2011-10-29
Medium Priority
Last Modified: 2012-05-12
Hi All,

This is my first request and I hope someone would help me on this.

I would like to change the domain name of the checkbox labeled "Primary DNS suffix of this computer” on Windows Server 2003 and Windows Server 2008 you can get to this check box by Right Click My Computer>Properties>Advanced System Settings>Computer Name>Change>More > then change the domain name and uncheck change primary DNS suffix when domain membership changes.

I am wondering if anyone knows if this can be done with script or Power Shell as I have to manually do this task of more than 200 servers.  I want to get the exact output as mentioned in the below screenshot.

Any help is much appreciated.
Question by:janis101
LVL 24

Accepted Solution

Sandeshdubey earned 2000 total points
ID: 37051991
LVL 13

Expert Comment

by:Greg Hejl
ID: 37052728
group policy will do this:

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

you can also publish registry settings:


Using Regedit
The primary DNS suffix is stored in the registry in the following location:
You might want to change the values for the following registry keys:

    Domain (REG_SZ)
    SearchList (REG_SZ)

test first then deploy...

good luck!

Featured Post

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background Information Recently I have fixed file server permission issues for one of my client. The client has 1800 users and one Windows Server 2008 R2 domain joined file server with 12 TB of data, 250+ shared folders and the folder structure i…
The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

864 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