Tag Archives: active directory

Windows 7 / Server 2008 R2 “Changing the Primary Domain DNS name of this computer to “” failed….”

Windows_Server_2008_R2_Logo

Windows Server 2008 R2 VMs started giving me errors while joining the domain recently, here is the exact error message that comes up:

Windows_7_Server_2008_R2_Changing_the_Primary_Domain_DNS_name_of_this_computer_to_failed_1

netsetup.log (%SystemRoot%\debug\netsetup.log) shows no errors and my VMs appears to be joined properly:

Windows_7_Server_2008_R2_Changing_the_Primary_Domain_DNS_name_of_this_computer_to_failed_2

Now to fix this there are two potential solutions/recommendations:
Continue reading

How to find out which Domain Controller my PC is talking to?

Windows_Server_2008_R2_Logo

One very useful piece of information to know, if you’re working in large Active Directory implementation with multiple DC’s and Sites, is to be able to determine which Domain Controller machines are authenticating against at any given time.

Here’s the command to tell us exactly that:

nltest /dsgetdc:domain_name

Rather handy if you’re testing whether Sites and Services have been setup correctly or are moving computer objects in Active Directory and want the quickest turnaround for GPO’s etc.

You could always use built-in ‘set l’ command but that’s not always accurate due to %logonserver% variable taking a bit of time to update if you change Active Directory site and ultimately domain controller you’re authentication against. Remote workers are good example as they tend to be all over the place and ‘set l’ might give misleading and not precise results.

Active Directory “computer name contains” search string

Windows_7_Logo

You just have to love the simple things in this world that are not so obvious at first thought…

In AD if you try to search for computer name and would like to be slightly more specific you have a problem. Here is the default choice:

The rather obvious choice would include “computer name contains” but sadly the option is not there! Solution? Simple – use LDAP search string instead! In ADUC define new query with custom search for:

(&(objectcategory=computer)(name=*0112*))

where 0112 is what you’re looking for (or computer name contains)

Continue reading