Follow me on Twitter @AntonioMaio2

Monday, August 10, 2015

Back to Networking Basics: Domain Joining New Azure VMs

I often use Microsoft Azure VMs to test various scenarios related to SharePoint 2013.  I work with a lot of on premise SharePoint clients and having an environment to quickly try something out is really helpful.  Azure let's me of course quickly spin up VMs using one of the templates from the gallery and get up and running quickly.  I have my own environment with several servers already setup in Azure, all within my own domain, and I often add a new server when I need to test something really new or experimental (not wanting to mess with my existing servers). 

When I create a new VM, Azure asks for me an administrative user account and password as part of that process, and makes that user a new local admin on the new server.

Once created, the first thing I typically want to do with that VM is domain join it to my domain.  Due to how Azure creates that VM with that local administrator account, there is a couple of extra steps that I need to manually perform (and sometimes forget) when domain joining that server.

These are just some networking basics, but I wanted to share those steps here so that you can quickly get through this process should you run into it.

When I connect to my new VM, and want to domain join it I typically use the following steps:
  • Open Windows Explorer
  • Right Click on This PC
  • Select Properties
  • Within the System page which appears, under the "Computer name, domain and workgroup settings" section, click Change Settings

  • Click the Change Button
  • Select the Domain radio button, enter my domain name and click OK
However, at this point, if you are in a new shiny Azure VM you'll often run into this error:

This error means that Windows Server does not know where to find your domain controller in order to contact AD and join the domain.  This happens even if you've created a 'network' within Azure and you selected that network when creating your new VM.  So let's look at how you tell it where your domain resides.

  • Right click on your Network icon in the task bar
  • Select Open Network and Sharing Center

  • Click on Change adapter settings
  • Find the Local Area Connection, right click on it and select Properties

  • Within the Ethernet Properties dialog, select and select the Internet Protocol Version 4 (TCP/IPv4) option
  • Click the Properties button
  • In the Properties window, select the Use the following DNS server addresses radio button, and enter the IP address of your AD Domain Controller VM as the Preferred DNS Server, and the IP address of your Default Gateway as the Alternate DNS Server as shown in the following.  You can find both of these IP addresses by connecting to your AD Domain Controller VM and running ipconfig at the command prompt.
  • Once entered, you can click the Advanced button shown, navigate to the DNS tab and you'll see these 2 IP addresses already added.

  • Click OK, OK and OK to exit out of these dialogs.

Your VM will now know where to look to find your domain controller when adding this server to your domain.  Return to Windows Explorer, right click on This PC, click Properties, click Change Settings and try to add your new VM to your domain now.

Enjoy your new Azure VM!


  1. From this post, i learn the process of domain joining new Azure VMs. The steps which you share in the post are good to understand this process. Android Event Apps

  2. In the Properties window, select the Use the accompanying DNS server addresses radio catch, and enter the IP location of your AD Domain Controller VM as the Preferred DNS Server, and the IP location of your Default Gateway as the Alternate DNS Server as appeared in the accompanying. When i was working on Microsoft Certification 70-410 its all about networking and with the help of this certification, You can discover both of these IP addresses by uniting with your AD Domain Controller VM and running ipconfig at the order brief.

  3. Doesn't work for me :-(

    I have been granted access to an Azure subscription with a resource group. The resource group has a virtual network that is connected to an on-premise network and there is a site-to-site VPN connection between those. This has been done by a third party.

    Now, my task is to create a virtual machine to that subscription using one of the pre-set images provided by Microsoft. This machine needs to be joined with the on-premise domain.

    I must have created the machine somehow wrongly as its default gateway is and not the one I have been provided (

  4. This is widely being used by other organizations as well. With some simple to understand procedures, you will be able to register to one of these services at a reduced price. Creative Company Names

  5. There are plenty of hosting companies you can find on the internet and buying your own domain name is not very expensive. Namecheap domain registration coupon

  6. People, as well, might need to register domain names that match theirs equitable in the event that they choose to build up a site later on.Domain Generator

  7. I needed to thank you for this phenomenal read!! I unquestionably adored each and every piece of it. I have you bookmarked your site to look at the new stuff you post.

  8. I am unquestionably making the most of your site. You unquestionably have some extraordinary knowledge and incredible stories.

  9. I am come here first time, i find the perfect article. Thanks for sharing interesting and informative post. privacy en bescherming

  10. I am continually amazed by the amount of information available on this subject. What you presented was well researched and well worded in order to get your stand on this across to all your readers.

  11. Actually I read it yesterday but I had some thoughts about it and today I wanted to read it again because it is very well written.
    mason soiza

  12. Thanks a lot for sharing us about this update. Hope you will not get tired on making posts as informative as this.

  13. You have made some decent points there. I looked on the internet for more information about the issue and found most people will go along with your views on this web site. Klik hier

  14. I want you to thank for your time of this wonderful read!!! I definitely enjoy every little bit of it and I have you bookmarked to check out new stuff of your blog a must read blog allertaprivacy