Skip to content

Commit 5abea1e

Browse files
authored
Update command to use index - line 99
1 parent f4fdeb0 commit 5abea1e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

articles/expressroute/how-to-routefilter-powershell.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ Run the following command to attach the route filter to the ExpressRoute circuit
9696
9797
```azurepowershell-interactive
9898
$ckt = Get-AzExpressRouteCircuit -Name "ExpressRouteARMCircuit" -ResourceGroupName "MyResourceGroup"
99-
$ckt.Peerings[0].RouteFilter = $routefilter
99+
$index = [array]::IndexOf(@($ckt.Peerings.PeeringType), "MicrosoftPeering")
100+
$ckt.Peerings[$index].RouteFilter = $routefilter
100101
Set-AzExpressRouteCircuit -ExpressRouteCircuit $ckt
101102
```
102103

0 commit comments

Comments
 (0)