RSS

Category Archives: Active Directory

Failed to join domain

I was setting up a new Hyper-V Core server with 3 network cards – 2 x LAN and 1 x WAN. I configured all cards with static IP Addresses. But when I attempted to join the domain, I received a very unhelpful error message:

Failed to join domain

And that’s it! No event log, nothing! Great. Now where do I go?

After searching all the corners of the internet, I found a solution. The problem was in the way the Hyper-V box ordered the network cards. It made the WAN card the first in the queue, so of course, when I attempted to connect it to the domain, it was going out into the Internet to find our domain. Doh!

To change the “order” of the network cards, you need to change the “Interface Metric”. In a normal Windows GUI, you can change each NIC interface metric by going into the properties of the NIC’s IP address, choosing advanced, and then manually changing the metric that way. NOTE: lower numbered metrics go first – but don’t choose ‘0’ as this signals an automatic metric which will put you back to where you are now. After you have changed the values, reboot for good measure.

But, if you have a server core machine without a GUI, then you need to perform some command line work.

Open a command prompt and do the following:

To display all of the adapters in the computer with their current IP addresses to determine the correct adapter name, type the following command:

netsh interface ip show config

To change to a static address, type the following command:

netsh interface ip set address “Local Area Connection” static ipaddr subnetmask gateway metric

For example, I need to change my Local Area Connection #7 to a metric of 5, I would do this:

netsh interface ip set address “Local Area Connection 7” static 172.16.1.10 255.255.0.0 172.16.1.1 5

And after a reboot, you will be able to join your server / PC to the domain without a problem.