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

Posted on 2011-10-29
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

    LVL 13

    Expert Comment

    by:Greg Hejl
    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!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Integrate social media with email signatures

    Is your company active on social media? Do you also use email signatures? Including social media icons in your email signature is a great way to get fans for free. Let all your email users know you’re on social media quickly and easily, in a single click.

    This article will show, step by step, how to integrate R code into a R Sweave document
    A quick step-by-step overview of installing and configuring Carbonite Server Backup.
    This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now