Hi @Oleg Tserkovnyuk ,
I think I found the issue.
- When I run Get-AzVirtualNetworkGatewayConnection to get a Connection Object Array, the ConnectionStatus is empty
- The same happens for “Shared Key” also
- However, if I just get one Connection Object (by specifying the -Name parameter), the ConnectionStatus is non-empty
I have informed this behavior to the concerned Product Teams and they are checking on this.
Meanwhile, what you can do is, run a for each loop across all the Connections to get the status (or any other property).
$Connections=Get-AzVirtualNetworkGatewayConnection -ResourceGroupName <RGName>
foreach ($Connection in $Connections)
{
$ConnectionObject=Get-AzVirtualNetworkGatewayConnection -Name $Connection.Name -ResourceGroupName $Connection.ResourceGroupName
Write-Host $ConnectionObject.Name
Write-Host $ConnectionObject.ConnectionStatus
}
Thanks for your continued contribution on Q&A and appreciate much for taking the time to share your feedback.
Request you to please close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.
Cheers,
Kapil