Azure / Azure/azure-powershell

[Doc]: https://learn.microsoft.com/powershell/module/az.dns/new-azdnsrecordconfig MX record example incorrect

Open
#23,089 2 comments 0 reactions 0 assignees View on GitHub
act-quality-productivity-squad customer-reported Doc - Reference Network - DNS Service Attention
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
2d 17h
Merged PRs (30d)
51

Description

### Description

is
### Example 4: Create a RecordSet of type MX
```powershell
$Records = @()
$Records += New-AzDnsRecordConfig -Exchange "mail.microsoft.com" -Preference 5
$RecordSet = New-AzDnsRecordSet -Name "www" -RecordType AAAA -ResourceGroupName "MyResourceGroup" -TTL 3600 -ZoneName "myzone.com" -DnsRecords $Records
```

should probably be:
### Example 4: Create a RecordSet of type MX
```powershell
$Records = @()
$Records += New-AzDnsRecordConfig -Exchange "mail.microsoft.com" -Preference 5
$RecordSet = New-AzDnsRecordSet -Name "@" -RecordType MX -ResourceGroupName "MyResourceGroup" -TTL 3600 -ZoneName "myzone.com" -DnsRecords $Records
```
I could be wrong don't trust me but I was looking for guidance on usage.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.