File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,24 @@ PS C:\> Get-AzPublicIpAddress -Name $publicIpName -ResourceGroupName $rgName
41
41
updated object, and modifies the allocation method to 'Static'. A public IP address gets
42
42
allocated immediately.
43
43
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
45
62
```
46
63
PS C:\> $publicIp = Get-AzPublicIpAddress -Name $publicIpName -ResourceGroupName $rgName
47
64
You can’t perform that action at this time.
0 commit comments