Get-AzureSubnetRouteTable
Gets a route table for a subnet.
Note
The cmdlets referenced in this documentation are for managing legacy Azure resources that use Service Management APIs. See the Az PowerShell module for cmdlets to manage Azure Resource Manager resources.
Syntax
Get-AzureSubnetRouteTable
-VirtualNetworkName <String>
-SubnetName <String>
[-Detailed]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Description
The Get-AzureSubnetRouteTable cmdlet gets the route table that is associated with a subnet.
Examples
Example 1: Display routes for a subnet
PS C:\> Get-AzureSubnetRouteTable -VirtualNetworkName "VNetUSCentral" -SubnetName "ContosoSubnet" -Detailed
Routes Name Location Label
------ ---- -------- -----
{internetroute} PublicRT Central US Sample RT in Central US
This command displays the routes in the route table name that is associated with subnet named ContosoSubnet.
Parameters
-Detailed
Indicates that this cmdlet displays the routes in the route table that is associated with the subnet.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Profile
Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.
Type: | AzureSMProfile |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SubnetName
Specifies the subnet for which this cmdlet gets the route table.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VirtualNetworkName
Specifies the name of a virtual network that contains the subnet for which this cmdlet gets the route table.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |