Skip to content

Commit abf2485

Browse files
Merge pull request #288355 from duongau/patch-7
ExpressRoute - Configure route filter with PowerShell (fix command to use index)
2 parents 9e54317 + 5abea1e commit abf2485

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)