Skip to content

Latest commit

 

History

History
86 lines (59 loc) · 3.31 KB

dns-powershell-setup-include.md

File metadata and controls

86 lines (59 loc) · 3.31 KB

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

Set up Azure PowerShell for Azure DNS

Before you begin

[!INCLUDE requires-azurerm]

Verify that you have the following items before beginning your configuration.

In addition, to use Private Zones (Public Preview), you need to ensure you have the below PowerShell modules and versions.

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

Sign in to your Azure account

Open your PowerShell console and connect to your account. For more information, see Sign in with AzureRM.

Connect-AzureRmAccount

Select the subscription

Check the subscriptions for the account.

Get-AzureRmSubscription

Choose which of your Azure subscriptions to use.

Select-AzureRmSubscription -SubscriptionName "your_subscription_name"

Create a resource group

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"

Register resource provider

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