Share via


How to set Primary DNS Suffix on machine without a GPO

Question

Tuesday, April 9, 2019 5:44 PM

I have machines I'm moving from one domain (OldDomain) to another (NewDomain).  In NewDomain, i have a GPO where Computer Config/Admin Templates/Network/DNS Client/Primary DNS suffix  is set to the suffix for NewDomain, but my problem is that with the tool I use to move them from OldDomain --> NewDomain, when they reboot into NewDomain, this GPO won't kick in until after they reboot a second time (since they just got the GPO after that first reboot, and that setting requires a reboot to kick in).   The problem this causes is that they cannot log in to their machine on NewDomain because of a trust relationship error until after that second reboot.

So my thought is, if i can set the primary DNS suffix on the machine via a command line right before the first reboot, they may be able to log in without the second reboot.  But I don't know what command line would do that on a Windows 10 machine.  Does anyone know?

All replies (5)

Wednesday, April 10, 2019 5:47 AM

Hello RJO22,

Thank you for posting in this forum.

Go to Control Panel->All Control Panel Items->System->Change settings->Change->More. If you check " Change primary DNS suffix when domain membership changes ", the machine automatically changes its primary DNS suffix after successfully joining the new domain.

Best Regards,

Leon

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
If you have feedback for TechNet Subscriber Support, contact [email protected].


Wednesday, April 10, 2019 1:01 PM

Thanks Leon.

Would you happen to know how I can set that via the registry, or some other way that i can do it remotely?


Thursday, April 11, 2019 9:26 AM

Hello RJO22,

Have you checked this article: Primary DNS Suffix?

Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

Best Regards,

Leon

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
If you have feedback for TechNet Subscriber Support, contact [email protected].


Thursday, April 11, 2019 1:59 PM

I did, but that key doesn't even exist on my machine, so figured the article was inaccurate.


Friday, April 12, 2019 9:39 AM

Hello RJO22,

I am not very familiar with the registry, so I can't provide more registry-related methods.

I think the method given above is very simple. If you want to configure multiple machines like this, you can use scripts.

Best Regards,
Leon

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
If you have feedback for TechNet Subscriber Support, contact [email protected].