Get-Network Controller Fabric Route

Gets a network route or all the routes in a subnet in the Network Controller.

Syntax

Get-NetworkControllerFabricRoute
   [-LogicalNetworkId] <String[]>
   [-SubnetId] <String[]>
   [[-ResourceId] <String[]>]
   -ConnectionUri <Uri>
   [-CertificateThumbprint <String>]
   [-Credential <PSCredential>]
   [-PassInnerException]
   [<CommonParameters>]

Description

The Get-NetworkControllerFabricRoute cmdlet gets a network route or all the routes in a specified logical subnet in the Network Controller. If you specify a route to get, this cmdlet gets the destination and next hop of the route. If you do not specify a route, this cmdlet returns all the routes in the logical subnet.

Examples

Example 1: Display all routes for a subnet

PS C:\> Get-NetworkControllerFabricRoute -ConnectionUri "https://networkcontroller" -LogicalNetworkId "Network13" -SubnetId "Subnet01"

This command retrieves all the routes in the subnet Subnet01. That subnet is in a logical network called Network13.

Example 2: Display address and next hop

PS C:\> $Route = Get-NetworkControllerFabricRoute -ConnectionUri "https://networkcontroller" -LogicalNetworkId "Network13" -SubnetId "Subnet01" -ResourceId "Route21"
PS C:\> $Route.Properties

The first command gets a route that has the ID Route21 in the subnet that has the ID Subnet01. That subnet is in the logical network Network13. The command stores the route in the $Route variable.

The second command displays properties of the route stored in $Route. Specifically, it shows the destination address and the next hop address.

Required Parameters

-ConnectionUri

Specifies the Uniform Resource Identifier (URI) of the Network Controller. All Representational State Transfer (REST) clients use this URI to connect to Network Controller.

Type: Uri
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-LogicalNetworkId

Specifies an array of IDs of logical networks from which this cmdlet gets routes.

Type: String[]
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-SubnetId

Specifies an array of IDs of subnets from which this cmdlet gets routes.

Type: String[]
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Optional Parameters

-CertificateThumbprint

Specifies the certificate thumbprint of a digital public key X.509 certificate of a user account that has permission to perform this action. In order for Network Controller to authorize the account, specify this thumbprint by using the ClientCertificateThumbprint parameter of the Install-NetworkController or Set-NetworkController cmdlet.

Type: String
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Credential

Specifies a user credential that has permission to perform this action. The default value is the current user. This user must be present in the security group specified in the ClientSecurityGroup parameter in the Install-NetworkController cmdlet.

Type: PSCredential
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-PassInnerException
Type: SwitchParameter
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ResourceId

Specifies the resource ID of the route that this cmdlet gets.

Type: String[]
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Outputs

This cmdlet returns an object that contains the destination and the next hop for a particular network route.