Quantcast
Channel: Azure Networking (DNS, Traffic Manager, VPN, VNET) forum
Viewing all articles
Browse latest Browse all 6513

New-AzureRmDnsRecordSet returns BadRequest: The record set of type 'CNAME' cannot be null

$
0
0

Hello, I am running the following powershell command:

$rs = New-AzureRmDnsRecordSet -Name <myName> -RecordType CNAME -Ttl 300 -ZoneName <myDomainName> -ResourceGroupName <myResourceGroupName>

... and get the error -

New-AzureRmDnsRecordSet : BadRequest: The record set of type 'CNAME' cannot be null.
At line:1 char:7
+ $rs = New-AzureRmDnsRecordSet -Name identity-ag1-westus -RecordType C ...
+       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [New-AzureRmDnsRecordSet], CloudException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Dns.NewAzureDnsRecordSet

... however, this works for A records and other record types.

How can I create a CNAME record?


Viewing all articles
Browse latest Browse all 6513

Trending Articles