I'm currently experiencing an issue while attempting to create a health probe using PowerShell. I've already successfully created multiple health probes through the portal.
When I execute the command, I don't receive any error messages. However, upon checking the portal, I cannot find the health probe that I attempted to create using PowerShell. Interestingly, I am able to create a health probe with the same name via the portal.
Any assistance in resolving this issue would be greatly appreciated. Thank you!
I used the command:
$getgw = Get-AzApplicationGateway -Name Nametest -ResourceGroupName RGtest
# Create the probe object that will check health
$probeApi = Add-AzApplicationGatewayProbeConfig -ApplicationGateway $getgw -Name $probeNameApi -Protocol Http -Path '/api/test' -Interval 30 -Timeout 120 -UnhealthyThreshold 3
To create health probe in PowerShell, make use of below command.
Output:
When I checked the same in Portal after executing script, health probe is created successfully like below: