Type of issue
Code doesn't work
Feedback
Ask:
This document Set-AzPrivateLinkService (Az.Network) | Microsoft Learn has mention of an example where private link service is created and its ipconfig is updated. In this example command to get public IP is incorrect, its highlighted in screenshot below
Command - $publicip = Get-AzPublicIpAddress -ResourceGroupName "myresourcegroup"
This command is fetching all public IP addresses present in resource group, due to which when we associate to frontend of Load Balancer, it throws an error -
Correct Command - $publicip = Get-AzPublicIpAddress -Name myPublicIp1 -ResourceGroupName "myresourcegroup"
So, modifications need to be done from $publicip = Get-AzPublicIpAddress -ResourceGroupName "myresourcegroup" to Get-AzPublicIpAddress -Name myPublicIp1 -ResourceGroupName "myresourcegroup"
Page URL
https://learn.microsoft.com/en-us/powershell/module/az.network/set-azprivatelinkservice?view=azps-12.1.0
Content source URL
https://learn.microsoft.com/en-us/powershell/module/az.network/set-azprivatelinkservice?view=azps-12.1.0#example-1-creates-a-private-link-service-and-update-its
Author
No response
Document Id
No response