Skip to content

Commit 70fcabe

Browse files
authored
Merge pull request #10523 from Cesarfgc/patch-1
Add new dns label
2 parents 1ec6244 + dc03de9 commit 70fcabe

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/Network/Network/help/Set-AzPublicIpAddress.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,24 @@ PS C:\> Get-AzPublicIpAddress -Name $publicIpName -ResourceGroupName $rgName
4141
updated object, and modifies the allocation method to 'Static'. A public IP address gets
4242
allocated immediately.
4343

44-
### 2: Change DNS domain label of a public IP address
44+
### 2: Add DNS domain label of a public IP address
45+
```
46+
PS C:\> $publicIp = Get-AzPublicIpAddress -Name $publicIpName -ResourceGroupName $rgName
47+
48+
PS C:\> $publicIp.DnsSettings = @{"DomainNameLabel" = "newdnsprefix"}
49+
50+
PS C:\> Set-AzPublicIpAddress -PublicIpAddress $publicIp
51+
52+
PS C:\> $publicIp = Get-AzPublicIpAddress -Name $publicIpName -ResourceGroupName $rgName
53+
```
54+
55+
First command gets the public IP address resource with name $publicIPName in the resource
56+
group $rgName.
57+
Second command sets the DomainNameLabel property to the required dns prefix.
58+
Set-AzPublicIPAddress command updates the public IP address resource with the
59+
updated object. DomainNameLabel & Fqdn are modified as expected.
60+
61+
### 3: Change DNS domain label of a public IP address
4562
```
4663
PS C:\> $publicIp = Get-AzPublicIpAddress -Name $publicIpName -ResourceGroupName $rgName
4764

0 commit comments

Comments
 (0)