Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.
I understand that you have a vHUB in failed state and you would like to delete it.
I would suggest you first GET the vHUB and update any random property.
So that the PUT operation would make it go into a succeeded state.
You can follow the below commands to do it,
$existingHub = Get-AzVirtualHub -ResourceGroupName "testRg" -Name "westushub" $route1 = Add-AzVirtualHubRoute -DestinationType "CIDR" -Destination @("10.4.0.0/16", "10.5.0.0/16") -NextHopType "IPAddress" -NextHop @("10.0.0.68") $routeTable1 = Add-AzVirtualHubRouteTable -Route @($route1) -Connection @("All_Vnets") -Name "routeTable1" Set-AzVirtualHub -VirtualHub $existingHub -RouteTable @($routeTable1)
Post this, the vHUB should go into a Succeeded state.
- Can you try the above and let us know if the vHUB went into Succeeded state?
- If yes, you can now go ahead and delete the vHUB using Portal or Powershell Remove-AzVirtualHub
Cheers,
Kapil