Skip to content

Fix Az.Network Syntax Errors #17701

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The first command gets the application gateway named ApplicationGateway01 in the
### Example 2: Add a back-end address pool by using backend server IP addresses
```powershell
$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
$AppGw = Add-AzApplicationGatewayBackendAddressPool -ApplicationGateway $ AppGw -Name "Pool02" -BackendIPAddresses "10.10.10.10", "10.10.10.11"
$AppGw = Add-AzApplicationGatewayBackendAddressPool -ApplicationGateway $AppGw -Name "Pool02" -BackendIPAddresses "10.10.10.10", "10.10.10.11"
```

The first command gets the application gateway named ApplicationGateway01 in the resource group named ResourceGroup01, and stores it in the $AppGw variable.The second command adds the back-end address pool of the application gateway stored in $AppGw by using IP addresses.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The **Add-AzApplicationGatewayCustomError** cmdlet adds a custom error to an app
```powershell
$resourceGroupName = "resourceGroupName"
$AppGWName = "applicationGatewayName"
$AppGw = Get-AzApplicationGateway -Name $AppGWName -ResourceGroup $resourceGroupName
$AppGw = Get-AzApplicationGateway -Name $AppGWName -ResourceGroupName $resourceGroupName
$customError502Url = "https://mycustomerrorpages.blob.core.windows.net/errorpages/502.htm"
$updatedgateway = Add-AzApplicationGatewayCustomError -ApplicationGateway $AppGw -StatusCode HttpStatus502 -CustomErrorPageUrl $customError502Url
Set-AzApplicationGateway -ApplicationGateway $AppGw
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The **Add-AzApplicationGatewayTrustedRootCertificate** cmdlet adds a trusted roo
```powershell
$gw = Get-AzApplicationGateway -Name $appgwName -ResourceGroupName $resgpName
$gw = Add-AzApplicationGatewayTrustedRootCertificate -ApplicationGateway $gw -Name $certName -CertificateFile ".\rootCA.cer"
$gw = Add-AzApplicationGatewayBackendHttpSettings -ApplicationGateway $gw -Name $poolSetting01Name -Port 443 -Protocol Https -CookieBasedAffinity Enabled -PickHostNameFromBackendAddress -TrustedRootCertificate $gw.TrustedRootCertificates[0]
$gw = Add-AzApplicationGatewayBackendHttpSetting -ApplicationGateway $gw -Name $poolSetting01Name -Port 443 -Protocol Https -CookieBasedAffinity Enabled -PickHostNameFromBackendAddress -TrustedRootCertificate $gw.TrustedRootCertificates[0]
$gw = Set-AzApplicationGateway -ApplicationGateway $gw
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ The **Add-AzApplicationGatewayUrlPathMapConfig** cmdlet adds an array of URL pat
```powershell
$appgw = Get-AzApplicationGateway -ResourceGroupName "rg" -Name "appGwName"
$pool = Get-AzApplicationGatewayBackendAddressPool -ApplicationGateway $appgw -Name "pool01"
$poolSettings = Get-AzApplicationGatewayBackendHttpSettings -ApplicationGateway $appgw -Name "poolSettings01"
$poolSettings = Get-AzApplicationGatewayBackendHttpSetting -ApplicationGateway $appgw -Name "poolSettings01"
$pathRule = New-AzApplicationGatewayPathRuleConfig -Name "rule01" -Paths "/path" -BackendAddressPool $pool -BackendHttpSettings $poolSettings
$appgw = Add-AzApplicationGatewayUrlPathMapConfig -ApplicationGateway $appgw -Name "url01" -PathRules $pathRule -DefaultBackendAddressPool $pool -DefaultBackendHttpSettings $poolSettings
$appgw = Set-AzApplicationGateway -ApplicationGateway $appgw
Expand Down
2 changes: 1 addition & 1 deletion src/Network/Network/help/Add-AzDelegation.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The **Add-AzDelegation** cmdlet adds a service delegation to an Azure subnet.
$vnet = Get-AzVirtualNetwork -Name "myVNet" -ResourceGroupName "myResourceGroup"
$subnet = Get-AzVirtualNetworkSubnetConfig -Name "mySubnet" -VirtualNetwork $vnet
$subnet = Add-AzDelegation -Name "myDelegation" -ServiceName "Microsoft.Sql/servers" -Subnet $subnet
Set-AzVirtualNetwork $vnet
Set-AzVirtualNetwork -VirtualNetwork $vnet
```

The first command retrieves the virtual network on which the subnet lies. The second command isolates out the subnet of interest - the one which you want to delegate. The third command adds a delegation to the subnet. This particular example would be useful when you want to enable SQL to create interface endpoints in this subnet. The final command sends the updated subnet to the server to actually update your subnet.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ enabled for use.
### Example 1: Add an authorization to the specified ExpressRoute circuit
```powershell
$Circuit = Get-AzExpressRouteCircuit -Name "ContosoCircuit" -ResourceGroupName "ContosoResourceGroup"
Add-AzExpressRouteCircuitAuthorization -Name "ContosoCircuitAuthorization" -Circuit $Circuit
Add-AzExpressRouteCircuitAuthorization -Name "ContosoCircuitAuthorization" -ExpressRouteCircuit $Circuit
Set-AzExpressRouteCircuit -ExpressRouteCircuit $Circuit
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The **Add-AzServiceEndpointPolicyDefinition** cmdlet add a service endpoint poli

### Example 1: Updates a service endpoint policy definition in a service endpoint policy
```powershell
$policydef= New-AzServiceEndpointPolicyDefinition -Name "ServiceEndpointPolicyDefinition1" -ResourceGroupName "ResourceGroup01" -Service "Microsoft.Storage" -ServiceResources "subscriptions/sub1" -Description "New Definition"
New-AzServiceEndpointPolicyDefinition -Name "ServiceEndpointPolicyDefinition1" -Service "Microsoft.Storage" -ServiceResource "subscriptions/sub1" -Description "New Definition"
```

This command updated the service endpoint policy definition with name ServiceEndpointPolicyDefinition1, service Microsoft.Storage, service resources subscriptions/sub1 and
Expand Down
2 changes: 1 addition & 1 deletion src/Network/Network/help/Add-AzVirtualRouterPeer.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The **Add-AzVirtualRouterPeer** cmdlet adds a VirtualRouter Peer to an Azure Vir

### Example 1
```powershell
Add-AzVirtualRouterPeer 1ResourceGroupName virtualRouterRG -PeerName csr -PeerIp 10.0.1.5 -PeerAsn 63000 -VirtualRouterName virtualRouter
Add-AzVirtualRouterPeer -ResourceGroupName virtualRouterRG -PeerName csr -PeerIp 10.0.1.5 -PeerAsn 63000 -VirtualRouterName virtualRouter
```

## PARAMETERS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ This commands returns all the available response headers.

### Example 4
```powershell
Get-AzApplicationGatewayAvailableServerVariableAndHeader - ServerVariable -RequestHeader -ResponseHeader
Get-AzApplicationGatewayAvailableServerVariableAndHeader -ServerVariable -RequestHeader -ResponseHeader
```

This commands returns all the available server variables, request and response headers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The **Get-AzApplicationGatewayConnectionDraining** cmdlet gets the connection dr
### Example 1
```powershell
$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
$Settings = Get-AzApplicationGatewayBackendHttpSettings -Name "Settings01" -ApplicationGateway $AppGw
$Settings = Get-AzApplicationGatewayBackendHttpSetting -Name "Settings01" -ApplicationGateway $AppGw
$ConnectionDraining = Get-AzApplicationGatewayConnectionDraining -BackendHttpSettings $Settings
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ The **Get-AzApplicationGatewayCustomError** cmdlet gets custom error(s) from a h

### Example 1: Gets a custom error in a http listener
```powershell
$ce = Get-AzApplicationGatewayCustomError -HttpListener $listener01 -StatusCode HttpStatus502
$ce = Get-AzApplicationGatewayHttpListenerCustomError -HttpListener $listener01 -StatusCode HttpStatus502
```

This command gets and returns the custom error of http status code 502 from the http listener $listener01.

### Example 2: Gets the list of all custom errors in a http listener
```powershell
$ces = Get-AzApplicationGatewayCustomError -HttpListener $listener01
$ces = Get-AzApplicationGatewayHttpListenerCustomError -HttpListener $listener01
```

This command gets and returns the list of all custom errors from the http listener $listener01.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The **Get-AzApplicationGatewayTrustedRootCertificate** cmdlet gets Trusted Root
### Example 1
```powershell
$gw = Get-AzApplicationGateway -Name $appgwName -ResourceGroupName $resgpName
$trustedRootCert = Get-AzApplicationGatewayTrustedRootCertificate -ApplicationGateway $gw -Name $certName --CertificateFile ".\rootCA.cer"
$trustedRootCert = Get-AzApplicationGatewayTrustedRootCertificate -ApplicationGateway $gw -Name $certName -CertificateFile ".\rootCA.cer"
```

The first command gets the Application Gateway and stores it in $gw variable.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ well as other information about the authorization, can be viewed at any time by
### Example 1: Get all ExpressRoute authorizations
```powershell
$Circuit = Get-AzExpressRouteCircuit -Name "ContosoCircuit" -ResourceGroupName "ContosoResourceGroup"
Get-AzExpressRouteCircuitAuthorization -Circuit $Circuit
Get-AzExpressRouteCircuitAuthorization -ExpressRouteCircuit $Circuit
```

These commands return information about all the ExpressRoute authorizations associated with an
Expand All @@ -46,7 +46,7 @@ authorizations associated with ContosoCircuit.
### Example 2: Get all ExpressRoute authorizations using the Where-Object cmdlet
```powershell
$Circuit = Get-AzExpressRouteCircuit -Name "ContosoCircuit" -ResourceGroupName "ContosoResourceGroup"
Get-AzExpressRouteCircuitAuthorization -Circuit $Circuit | Where-Object {$_.AuthorizationUseStatus -eq "Available"}
Get-AzExpressRouteCircuitAuthorization -ExpressRouteCircuit $Circuit | Where-Object {$_.AuthorizationUseStatus -eq "Available"}
```

These commands represent a variation on the commands used in Example 1. In this case, however,
Expand Down
6 changes: 3 additions & 3 deletions src/Network/Network/help/Get-AzExpressRouteConnection.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ $ExpressRouteCircuit = New-AzExpressRouteCircuit -ResourceGroupName "testRG" -Na
Add-AzExpressRouteCircuitPeeringConfig -Name "AzurePrivatePeering" -ExpressRouteCircuit $ExpressRouteCircuit -PeeringType AzurePrivatePeering -PeerASN 100 -PrimaryPeerAddressPrefix "123.0.0.0/30" -SecondaryPeerAddressPrefix "123.0.0.4/30" -VlanId 300
$ExpressRouteCircuit = Set-AzExpressRouteCircuit -ExpressRouteCircuit $ExpressRouteCircuit
$ExpressRouteCircuitPeeringId = $ExpressRouteCircuit.Peerings[0].Id
New-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -ParentResourceName $ExpressRouteGateway.Name -Name "testConnection" -ExpressRouteCircuitPeeringId $ExpressRouteCircuitPeeringId -RoutingWeight 20
Get-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -ParentResourceName $ExpressRouteGateway.Name -Name "testConnection"
New-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -ExpressRouteGatewayName $ExpressRouteGateway.Name -Name "testConnection" -ExpressRouteCircuitPeeringId $ExpressRouteCircuitPeeringId -RoutingWeight 20
Get-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -ExpressRouteGatewayName $ExpressRouteGateway.Name -Name "testConnection"
```

```output
Expand Down Expand Up @@ -88,7 +88,7 @@ Then it gets the connection using the connection name.
### Example 2

```powershell
Get-AzExpressRouteConnection -ResourceGroupName ps9361 -ParentResourceName testExpressRoutegw -Name test*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-ExpressRouteGatewayName

Get-AzExpressRouteConnection -ResourceGroupName ps9361 -ExpressRouteGatewayName testExpressRoutegw -Name test*
```

```output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ a particular peering. You can use the ARP table to validate layer 2 configuratio

### Example 1: Display the ARP table for an ExpressRoute peer
```powershell
Get-AzExpressRouteCrossConnectionARPTable -ResourceGroupName $RG -ExpressRouteCrossConnectionName $CrossConnectionName -PeeringType MicrosoftPeering -DevicePath Primary
Get-AzExpressRouteCrossConnectionARPTable -ResourceGroupName $RG -CrossConnectionName $CrossConnectionName -PeeringType MicrosoftPeering -DevicePath Primary
```

## PARAMETERS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ connectivity.

### Example 1: Display the route table for the primary path
```powershell
Get-AzExpressRouteCrossConnectionRouteTable -ResourceGroupName $RG -ExpressRouteCrossConnectionName $CircuitName -DevicePath 'Primary'
Get-AzExpressRouteCrossConnectionRouteTable -ResourceGroupName $RG -CrossConnectionName $CircuitName -PeeringType MicrosoftPeering -DevicePath Primary
```

## PARAMETERS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ router.

### Example 1: Display the route summary for the primary path
```powershell
Get-AzExpressRouteCrossConnectionRouteTableSummary -ResourceGroupName $RG -ExpressRouteCrossConnectionName $CrossConnectionName -DevicePath 'Primary'
Get-AzExpressRouteCrossConnectionRouteTableSummary -ResourceGroupName $RG -CrossConnectionName $CrossConnectionName -PeeringType MicrosoftPeering -DevicePath Primary
```

## PARAMETERS
Expand Down
6 changes: 3 additions & 3 deletions src/Network/Network/help/Get-AzNetworkInterfaceTapConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,21 @@ The **Get-AzNetworkInterfaceTapConfig** cmdlet gets an Azure Tap Configuration f

### Example 1: Get all tap configurations for a given network interface
```powershell
Get-AzNetworkInterfaceTapConfig -ResourceGroupName "ResourceGroup1" -NetworkInterface "sourceNicName"
Get-AzNetworkInterfaceTapConfig -ResourceGroupName "ResourceGroup1" -NetworkInterfaceName "sourceNicName"
```

This command gets tap configurations added for the given network interface.

### Example 2: Get a given tap configuration
```powershell
Get-AzNetworkInterface -ResourceGroupName "ResourceGroup1" -NetworkInterface "sourceNicName" -Name "tapconfigName"
Get-AzNetworkInterface -ResourceGroupName "ResourceGroup1" -NetworkInterfaceName "sourceNicName" -Name "tapconfigName"
```

This command gets specific tap configuration added for the given network interface.

### Example 3: Get a given tap configuration
```powershell
Get-AzNetworkInterface -ResourceGroupName "ResourceGroup1" -NetworkInterface "sourceNicName" -Name "tapconfig*"
Get-AzNetworkInterface -ResourceGroupName "ResourceGroup1" -NetworkInterfaceName "sourceNicName" -Name "tapconfig*"
```

This command gets tap configurations added for the given network interface with name starting with "tapconfig".
Expand Down
2 changes: 1 addition & 1 deletion src/Network/Network/help/Get-AzNetworkWatcher.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The Get-AzNetworkWatcher cmdlet gets one or more Azure Network Watcher resources

### Example 1: Get a Network Watcher
```powershell
Get-AzNetworkWatcher -Name NetworkWatcher_westcentralus -ResourceGroup NetworkWatcherRG
Get-AzNetworkWatcher -Name NetworkWatcher_westcentralus -ResourceGroupName NetworkWatcherRG
```

```output
Expand Down
4 changes: 2 additions & 2 deletions src/Network/Network/help/Get-AzNetworkWatcherNextHop.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ Next hop allows you to view the type of Azure resource, the associated IP addres

### Example 1: Get the Next Hop when communicating with an Internet IP
```powershell
$nw = Get-AzResource | Where {$_.ResourceType -eq "Microsoft.Network/networkWatchers" -and $_.Location -eq "WestCentralUS" }
$nw = Get-AzResource | Where-Object {$_.ResourceType -eq "Microsoft.Network/networkWatchers" -and $_.Location -eq "WestCentralUS" }
$networkWatcher = Get-AzNetworkWatcher -Name $nw.Name -ResourceGroupName $nw.ResourceGroupName
$VM = Get-AzVM -ResourceGroupName ContosoResourceGroup -Name VM0
$Nics = Get-AzNetworkInterface | Where {$_.Id -eq $vm.NetworkProfile.NetworkInterfaces.Id.ForEach({$_})}
$Nics = Get-AzNetworkInterface | Where-Object {$_.Id -eq $vm.NetworkProfile.NetworkInterfaces.Id.ForEach({$_})}
Get-AzNetworkWatcherNextHop -NetworkWatcher $networkWatcher -TargetVirtualMachineId $VM.Id -SourceIPAddress $nics[0].IpConfigurations[0].PrivateIpAddress -DestinationIPAddress 204.79.197.200
```

Expand Down
4 changes: 2 additions & 2 deletions src/Network/Network/help/Get-AzNetworkWatcherPacketCapture.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ The Get-AzNetworkWatcherPacketCapture gets the properties and status of a packet

### Example 1: Create a Packet Capture with multiple filters and retrieve its status
```powershell
$nw = Get-AzResource | Where {$_.ResourceType -eq "Microsoft.Network/networkWatchers" -and $_.Location -eq "WestCentralUS" }
$nw = Get-AzResource | Where-Object {$_.ResourceType -eq "Microsoft.Network/networkWatchers" -and $_.Location -eq "WestCentralUS" }
$networkWatcher = Get-AzNetworkWatcher -Name $nw.Name -ResourceGroupName $nw.ResourceGroupName

$storageAccount = Get-AzStorageAccount -ResourceGroupName contosoResourceGroup -Name contosostorage123

$filter1 = New-AzPacketCaptureFilterConfig -Protocol TCP -RemoteIPAddress "1.1.1.1-255.255.255" -LocalIPAddress "10.0.0.3" -LocalPort "1-65535" -RemotePort "20;80;443"
$filter2 = New-AzPacketCaptureFilterConfig -Protocol UDP
New-AzNetworkWatcherPacketCapture -NetworkWatcher $networkWatcher -TargetVirtualMachineId $vm.Id -PacketCaptureName "PacketCaptureTest" -StorageAccountId $storageAccount.id -TimeLimitInSeconds 60 -Filters $filter1, $filter2
New-AzNetworkWatcherPacketCapture -NetworkWatcher $networkWatcher -TargetVirtualMachineId $vm.Id -PacketCaptureName "PacketCaptureTest" -StorageAccountId $storageAccount.id -TimeLimitInSeconds 60 -Filter $filter1, $filter2

Get-AzNetworkWatcherPacketCapture -NetworkWatcher $networkWatcher -PacketCaptureName "PacketCaptureTest"
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The Get-AzNetworkWatcherSecurityGroupView enables you to view the configured and

### Example 1: Make a Security Group View call on a VM
```powershell
$nw = Get-AzResource | Where {$_.ResourceType -eq "Microsoft.Network/networkWatchers" -and $_.Location -eq "WestCentralUS" }
$nw = Get-AzResource | Where-Object {$_.ResourceType -eq "Microsoft.Network/networkWatchers" -and $_.Location -eq "WestCentralUS" }
$networkWatcher = Get-AzNetworkWatcher -Name $nw.Name -ResourceGroupName $nw.ResourceGroupName
$VM = Get-AzVM -ResourceGroupName ContosoResourceGroup -Name VM0
Get-AzNetworkWatcherSecurityGroupView -NetworkWatcher $networkWatcher -TargetVirtualMachineId $VM.Id
Expand Down
2 changes: 1 addition & 1 deletion src/Network/Network/help/Get-AzNetworkWatcherTopology.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Note: If resources from multiple regions reside in the resource group, only the

### Example 1: Get an Azure Topology
```powershell
$networkWatcher = Get-AzNetworkWatcher -Name NetworkWatcher_westcentralus -ResourceGroup NetworkWatcherRG
$networkWatcher = Get-AzNetworkWatcher -Name NetworkWatcher_westcentralus -ResourceGroupName NetworkWatcherRG
Get-AzNetworkWatcherTopology -NetworkWatcher $networkWatcher -ResourceGroupName testresourcegroup
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ If the troubleshooting operation is currently in progress, then this operation m

### Example 1: Start Troubleshooting on a Virtual Network Gateway and Retrieve Result
```powershell
$nw = Get-AzResource | Where {$_.ResourceType -eq "Microsoft.Network/networkWatchers" -and $_.Location -eq "WestCentralUS" }
$nw = Get-AzResource | Where-Object {$_.ResourceType -eq "Microsoft.Network/networkWatchers" -and $_.Location -eq "WestCentralUS" }
$networkWatcher = Get-AzNetworkWatcher -Name $nw.Name -ResourceGroupName $nw.ResourceGroupName

$target = '/subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{vnetGatewayName}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ Given A route server peer either by name or by object, enumerate routes being ad

### Example 1
```powershell
Get-AzRouteServerPeerAdvertisedRouter -ResourceGroupName $resourceGroupName -RouteServerName $routeServerName -PeerName $peerName
Get-AzRouteServerPeerAdvertisedRoute -ResourceGroupName $resourceGroupName -RouteServerName $routeServerName -PeerName $peerName
```

### Example 2
```powershell
$routeServerPeer = Get-AzRouteServerPeer -ResourceGroupName $resourceGroupName -RouteServerName $routeServerName -PeerName $peerName
Get-AzRouteServerPeerAdvertisedRouter -InputObject $routeServerPeer
Get-AzRouteServerPeerAdvertisedRoute -InputObject $routeServerPeer
```

## PARAMETERS
Expand Down
4 changes: 2 additions & 2 deletions src/Network/Network/help/Get-AzRouteServerPeerLearnedRoute.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ Enumerate routes learned by a route server peer from other sources.

### Example 1
```powershell
Get-AzRouteServerPeerLearnedRouter -ResourceGroupName $resourceGroupName -RouteServerName $routeServerName -PeerName $peerName
Get-AzRouteServerPeerLearnedRoute -ResourceGroupName $resourceGroupName -RouteServerName $routeServerName -PeerName $peerName
```

### Example 2
```powershell
$routerServerPeer = Get-AzRouteServerPeer -ResourceGroupName $resourceGroupName -RouteServerName $routeServerName -PeerName $peerName
Get-AzRouteServerPeerLearnedRouter -InputObject $routerServerPeer
Get-AzRouteServerPeerLearnedRoute -InputObject $routerServerPeer
```

## PARAMETERS
Expand Down
Loading