Skip to content

Commit c2db17d

Browse files
authored
Merge pull request #11724 from FabienLavocat/master
Fix inconsistencies in the Resource Group Name for Private DNS PowerShell cmds
2 parents e9906e9 + e8858e7 commit c2db17d

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

articles/dns/private-dns-getstarted-powershell.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,33 +36,33 @@ These instructions assume you have already installed and signed in to Azure Powe
3636
Before creating the DNS zone, a resource group is created to contain the DNS zone. The following example shows the command.
3737

3838
```powershell
39-
New-AzureRMResourceGroup -name MyResourceGroup -location "westus"
39+
New-AzureRMResourceGroup -name MyAzureResourceGroup -location "westus"
4040
```
4141

4242
## Create a DNS private zone
4343

44-
A DNS zone is created by using the `New-AzureRmDnsZone` cmdlet together with a value of "Private" for the ZoneType parameter. The following example creates a DNS zone called *contoso.local* in the resource group called *MyResourceGroup* and makes the DNS zone available to the virtual network called *MyAzureVnet*. Use the example to create a DNS zone, substituting the values for your own.
44+
A DNS zone is created by using the `New-AzureRmDnsZone` cmdlet together with a value of "Private" for the ZoneType parameter. The following example creates a DNS zone called *contoso.local* in the resource group called *MyAzureResourceGroup* and makes the DNS zone available to the virtual network called *MyAzureVnet*. Use the example to create a DNS zone, substituting the values for your own.
4545

4646
Note that if the ZoneType parameter is omitted, the Zone will be created as a Public zone, so it is required if you need to create a Private Zone.
4747

4848
```powershell
49-
$vnet = Get-AzureRmVirtualNetwork -Name MyAzureVnet -ResourceGroupName VnetResourceGroup
50-
New-AzureRmDnsZone -Name contoso.local -ResourceGroupName MyResourceGroup -ZoneType Private -ResolutionVirtualNetworkId @($vnet.Id)
49+
$vnet = Get-AzureRmVirtualNetwork -Name MyAzureVnet -ResourceGroupName MyAzureResourceGroup
50+
New-AzureRmDnsZone -Name contoso.local -ResourceGroupName MyAzureResourceGroup -ZoneType Private -ResolutionVirtualNetworkId @($vnet.Id)
5151
```
5252

5353
If you need Azure to automatically create hostname records in the zone, use the *RegistrationVirtualNetworkId* parameter instead of *ResolutionVirtualNetworkId*. Registration virtual networks are automatically enabled for resolution.
5454

5555
```powershell
56-
$vnet = Get-AzureRmVirtualNetwork -Name MyAzureVnet -ResourceGroupName VnetResourceGroup
57-
New-AzureRmDnsZone -Name contoso.local -ResourceGroupName MyResourceGroup -ZoneType Private -RegistrationVirtualNetworkId @($vnet.Id)
56+
$vnet = Get-AzureRmVirtualNetwork -Name MyAzureVnet -ResourceGroupName MyAzureResourceGroup
57+
New-AzureRmDnsZone -Name contoso.local -ResourceGroupName MyAzureResourceGroup -ZoneType Private -RegistrationVirtualNetworkId @($vnet.Id)
5858
```
5959

6060
## Create a DNS record
6161

62-
You create record sets by using the `New-AzureRmDnsRecordSet` cmdlet. The following example creates a record with the relative name "db" in the DNS Zone "contoso.local", in resource group "MyResourceGroup". The fully-qualified name of the record set is "db.contoso.local". The record type is "A", with IP address "10.0.0.4", and the TTL is 3600 seconds.
62+
You create record sets by using the `New-AzureRmDnsRecordSet` cmdlet. The following example creates a record with the relative name "db" in the DNS Zone "contoso.local", in resource group "MyAzureResourceGroup". The fully-qualified name of the record set is "db.contoso.local". The record type is "A", with IP address "10.0.0.4", and the TTL is 3600 seconds.
6363

6464
```powershell
65-
New-AzureRmDnsRecordSet -Name db -RecordType A -ZoneName contoso.local -ResourceGroupName MyResourceGroup -Ttl 3600 -DnsRecords (New-AzureRmDnsRecordConfig -IPv4Address "10.0.0.4")
65+
New-AzureRmDnsRecordSet -Name db -RecordType A -ZoneName contoso.local -ResourceGroupName MyAzureResourceGroup -Ttl 3600 -DnsRecords (New-AzureRmDnsRecordConfig -IPv4Address "10.0.0.4")
6666
```
6767

6868
For other record types, for record sets with more than one record, and to modify existing records, see [Manage DNS records and record sets using Azure PowerShell](dns-operations-recordsets.md).
@@ -72,7 +72,7 @@ For other record types, for record sets with more than one record, and to modify
7272
To list the DNS records in your zone, use:
7373

7474
```powershell
75-
Get-AzureRmDnsRecordSet -ZoneName contoso.local -ResourceGroupName MyResourceGroup
75+
Get-AzureRmDnsRecordSet -ZoneName contoso.local -ResourceGroupName MyAzureResourceGroup
7676
```
7777

7878
# List DNS private zones
@@ -98,15 +98,15 @@ The below example replaces the Registration Virtual Network linked to a zone, to
9898
Please note that you must not specify the ZoneType parameter for update, unlike for create.
9999

100100
```powershell
101-
$vnet = Get-AzureRmVirtualNetwork -Name MyNewAzureVnet -ResourceGroupName MyResourceGroup
102-
Set-AzureRmDnsZone -Name contoso.local -ResourceGroupName MyResourceGroup -RegistrationVirtualNetworkId @($vnet.Id)
101+
$vnet = Get-AzureRmVirtualNetwork -Name MyNewAzureVnet -ResourceGroupName MyAzureResourceGroup
102+
Set-AzureRmDnsZone -Name contoso.local -ResourceGroupName MyAzureResourceGroup -RegistrationVirtualNetworkId @($vnet.Id)
103103
```
104104

105105
The below example replaces the Resolution Virtual Network linked to a zone, to a new one named "MyNewAzureVnet".
106106

107107
```powershell
108-
$vnet = Get-AzureRmVirtualNetwork -Name MyNewAzureVnet -ResourceGroupName MyResourceGroup
109-
Set-AzureRmDnsZone -Name contoso.local -ResourceGroupName MyResourceGroup -ResolutionVirtualNetworkId @($vnet.Id)
108+
$vnet = Get-AzureRmVirtualNetwork -Name MyNewAzureVnet -ResourceGroupName MyAzureResourceGroup
109+
Set-AzureRmDnsZone -Name contoso.local -ResourceGroupName MyAzureResourceGroup -ResolutionVirtualNetworkId @($vnet.Id)
110110
```
111111

112112
## Delete a DNS private zone
@@ -131,14 +131,14 @@ Remove-AzureRmDnsZone -Name contoso.local -ResourceGroupName MyAzureResourceGrou
131131
You can specify the zone to be deleted using a `$zone` object returned by `Get-AzureRmDnsZone`.
132132

133133
```powershell
134-
$zone = Get-AzureRmDnsZone -Name contoso.local -ResourceGroupName MyResourceGroup
134+
$zone = Get-AzureRmDnsZone -Name contoso.local -ResourceGroupName MyAzureResourceGroup
135135
Remove-AzureRmDnsZone -Zone $zone
136136
```
137137

138138
The zone object can also be piped instead of being passed as a parameter:
139139

140140
```powershell
141-
Get-AzureRmDnsZone -Name contoso.local -ResourceGroupName MyResourceGroup | Remove-AzureRmDnsZone
141+
Get-AzureRmDnsZone -Name contoso.local -ResourceGroupName MyAzureResourceGroup | Remove-AzureRmDnsZone
142142
143143
```
144144

@@ -160,7 +160,7 @@ For more information about `-Confirm` and `$ConfirmPreference`, see [About Prefe
160160
To delete all resources created in this article, take the following step:
161161

162162
```powershell
163-
Remove-AzureRMResourceGroup -Name MyResourceGroup
163+
Remove-AzureRMResourceGroup -Name MyAzureResourceGroup
164164
```
165165

166166
## Next steps

0 commit comments

Comments
 (0)