Changing DNS settings on Microsoft Azure

Share this:

A common task when building a new site or changing the Domain Controllers in Microsoft Azure is to change the DNS Server configuration at the Virtual Network level. Microsoft recommends to restart the VM after changing the DNS settings, however there is a workaround that may be useful on your environment to save the restart time.

Solution


Let’s use a simple example, our environment is configured to use the 10.10.10.10 DNS server for the RG-VN-DefaultNW Virtual Network, as depicted in the image below.

image

If we change the DNS to use the default one (Azure provided) we will see a warning saying that the VMs that are using this Virtual Network must be restarted to use the new DNS settings.

image

 

 

There is a simple shortcut that works, connected to the VM, run this following command as administrator on the command prompt:

ipconfig /release && ipconfig /renew

image

The same procedure can be applied to AWS instances as well, when changing the DHCP scope of a VPC (Virtual Private Cloud).

Written by Anderson Patricio

Anderson Patricio

Anderson Patricio is a Canadian MVP in Cloud and Datacenter Management, and Office Server and Services, besides the Microsoft Award he also holds a Solutions Master (MCSM) in Exchange and several other certifications. Anderson has been contributing to the Microsoft Community with articles, tutorials, blog posts, twitter, forums and book reviews. He is a regular contributor here at ITPROCentral.com, MSExchange.org, Techgenix.com and Anderson Patricio.org (Portuguese).

Related Post

Azure AD Connect–Forcing synchronization usi... If you are using Azure AD Connect and want to force a synchronization using PowerShell, stick around and we are going over the process.  Solutio...
Azure Cloud Shell Everywhere WOW! Microsoft did it again! If you didn’t saw the announcements at the Microsoft Build 2017 Conference, you should! They announce a lot of new thing...
Installing Azure CLI on a Mac OS X Microsoft Azure is open for all type of administrators, and if you use a Mac OS X,  you can access the portal using your Safari and also use Azure CLI...
Containers on Azure – Part 2 On the previous post (see here), I talked about the concept of Containers, Azure Container Service and Azure Service Fabric. Now that you know the con...