title: include file for PowerShell for Azure DNS description: include file for PowerShell for Azure DNS services: dns author: subsarma ms.service: dns ms.topic: include file for PowerShell for Azure DNS ms.date: 03/21/2018 ms.author: subsarma ms.custom: include file for PowerShell for Azure DNS
[!INCLUDE requires-azurerm]
Verify that you have the following items before beginning your configuration.
- An Azure subscription. If you don't already have an Azure subscription, you can activate your MSDN subscriber benefits or sign up for a free account.
- You need to install the latest version of the Azure Resource Manager PowerShell cmdlets. For more information, see How to install and configure Azure PowerShell.
In addition, to use Private Zones (Public Preview), you need to ensure you have the below PowerShell modules and versions.
- AzureRM.Dns - version 4.1.0 or above
- AzureRM.Network - version 5.4.0 or above
Find-Module -Name AzureRM.Dns
Find-Module -Name AzureRM.Network
The output of the above commands needs to show that the version of AzureRM.Dns is 4.1.0 or higher version, and for AzureRM.Network is 5.4.0 or higher version.
In case your system has earlier versions, you can either install the latest version of Azure PowerShell, or download and install the above modules from the PowerShell Gallery, using the links above next to the Module versions. You can then install them using the below commands. Both the modules are required and are fully backwards compatible.
Install-Module -Name AzureRM.Dns -Force
Install-Module -Name AzureRM.Network -Force
Open your PowerShell console and connect to your account. For more information, see Sign in with AzureRM.
Connect-AzureRmAccount
Check the subscriptions for the account.
Get-AzureRmSubscription
Choose which of your Azure subscriptions to use.
Select-AzureRmSubscription -SubscriptionName "your_subscription_name"
Azure Resource Manager requires that all resource groups specify a location. This location is used as the default location for resources in that resource group. However, because all DNS resources are global, not regional, the choice of resource group location has no impact on Azure DNS.
You can skip this step if you are using an existing resource group.
New-AzureRmResourceGroup -Name MyAzureResourceGroup -location "West US"
The Azure DNS service is managed by the Microsoft.Network resource provider. Your Azure subscription must be registered to use this resource provider before you can use Azure DNS. This is a one-time operation for each subscription.
Register-AzureRmResourceProvider -ProviderNamespace Microsoft.Network