Get-AzVHubOutboundRoute
Retrieves the outbound routes of a virtual hub connection
Syntax
ByVirtualHubName (Default)
Get-AzVHubOutboundRoute
-ResourceGroupName <String>
-VirtualHubName <String>
[-ResourceUri <String>]
[-VirtualWanConnectionType <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ByVirtualHubObject
Get-AzVHubOutboundRoute
-VirtualHubObject <PSVirtualHub>
[-ResourceUri <String>]
[-VirtualWanConnectionType <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ByVirtualHubResourceId
Get-AzVHubOutboundRoute
-VirtualHubResourceId <String>
[-ResourceUri <String>]
[-VirtualWanConnectionType <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Gets the outbound routes of the given virtual hub connection
Examples
Example 1
New-AzVirtualWan -ResourceGroupName "testRg" -Name "testWan" -Location "westcentralus" -VirtualWANType "Standard" -AllowVnetToVnetTraffic -AllowBranchToBranchTraffic
$virtualWan = Get-AzVirtualWan -ResourceGroupName "testRg" -Name "testWan"
New-AzVirtualHub -ResourceGroupName "testRg" -Name "testHub" -Location "westcentralus" -AddressPrefix "10.0.0.0/16" -VirtualWan $virtualWan
$virtualHub = Get-AzVirtualHub -ResourceGroupName "testRg" -Name "testHub"
$hubVnetConnectionId = "/subscriptions/testSub/resourceGroups/testRg/providers/Microsoft.Network/virtualHubs/testHub/hubVirtualNetworkConnections/testCon"
Get-AzVHubOutboundRoute -VirtualHubObject $virtualHub -ResourceUri $hubVnetConnectionId -VirtualWanConnectionType "HubVirtualNetworkConnection"
Value : [
{
"Prefix": "10.2.0.0/16",
"BgpCommunities": "4293853166",
"AsPath": ""
}
]
This command gets the outbound routes of the virtual hub spoke vnet connection.
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
The resource group name.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByVirtualHubName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceUri
The resource uri of a virtual wan connection resource.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-VirtualHubName
The virtual hub resource name.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: ParentVirtualHubName, ParentResourceName
Parameter sets
ByVirtualHubName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-VirtualHubObject
The parent resource.
Parameter properties
Type: PSVirtualHub
Default value: None
Supports wildcards: False
DontShow: False
Aliases: ParentObject, ParentVirtualHub
Parameter sets
ByVirtualHubObject
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-VirtualHubResourceId
The virtual hub resource id.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: VirtualHubId, ParentVirtualHubId
Parameter sets
ByVirtualHubResourceId
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-VirtualWanConnectionType
The virtual wan connection type.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs