Get-AzVHubOutboundRoute
Retrieves the outbound routes of a virtual hub connection
Syntax
Get-AzVHubOutboundRoute
-ResourceGroupName <String>
-VirtualHubName <String>
[-ResourceUri <String>]
[-VirtualWanConnectionType <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzVHubOutboundRoute
-VirtualHubObject <PSVirtualHub>
[-ResourceUri <String>]
[-VirtualWanConnectionType <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
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.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
The resource group name.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceUri
The resource uri of a virtual wan connection resource.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VirtualHubName
The virtual hub resource name.
Type: | String |
Aliases: | ParentVirtualHubName, ParentResourceName |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VirtualHubObject
The parent resource.
Type: | PSVirtualHub |
Aliases: | ParentObject, ParentVirtualHub |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VirtualHubResourceId
The virtual hub resource id.
Type: | String |
Aliases: | VirtualHubId, ParentVirtualHubId |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VirtualWanConnectionType
The virtual wan connection type.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Outputs
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
Azure PowerShell