New-AzureDns

Creates an Azure DNS settings object.

Note

The cmdlets referenced in this documentation are for managing legacy Azure resources that use Azure Service Manager (ASM) APIs. This legacy PowerShell module isn't recommended when creating new resources since ASM is scheduled for retirement. For more information, see Azure Service Manager retirement.

The Az PowerShell module is the recommended PowerShell module for managing Azure Resource Manager (ARM) resources with PowerShell.

Syntax

New-AzureDns
   [-Name] <String>
   [-IPAddress] <String>
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [<CommonParameters>]

Description

The New-AzureDns cmdlet creates an Azure DNS settings object. You can use a DNS settings object when you create a virtual machine by using the New-AzureVM cmdlet.

Examples

Example 1: Create a DNS settings object

PS C:\> $Dns = New-AzureDns -Name "Dns01" -IPAddress "10.1.2.4"

This command creates an Azure DNS settings object. The DNS server has the specified address and the friendly name Dns01. The command stores the object in the $Dns variable for use by the New-AzureVM cmdlet.

Parameters

-InformationAction

Specifies how this cmdlet responds to an information event.

The acceptable values for this parameter are:

  • Continue
  • Ignore
  • Inquire
  • SilentlyContinue
  • Stop
  • Suspend
Type:ActionPreference
Aliases:infa
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InformationVariable

Specifies an information variable.

Type:String
Aliases:iv
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IPAddress

Specifies the IP address of the DNS server.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specifies a friendly name for the DNS server. This name is not necessarily a fully qualified domain name.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False