Get-AzVHubEffectiveRoute
Retrieves the effective routes of a virtual hub resource
Syntax
Get-AzVHubEffectiveRoute
-ResourceGroupName <String>
-VirtualHubName <String>
[-ResourceId <String>]
[-VirtualWanResourceType <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzVHubEffectiveRoute
-VirtualHubObject <PSVirtualHub>
[-ResourceId <String>]
[-VirtualWanResourceType <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzVHubEffectiveRoute
-VirtualHubResourceId <String>
[-ResourceId <String>]
[-VirtualWanResourceType <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Gets the effective routes of the given virtual hub resource
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"
$hubRouteTableId = "/subscriptions/eb40168c-f355-4a18-b13c-5d9751d314c6/resourceGroups/testRg/providers/Microsoft.Network/virtualHubs/testHub/hubRouteTables/defaultRouteTable"
Get-AzVHubEffectiveRoute -VirtualHubObject $virtualHub -ResourceId $hubRouteTableId -VirtualWanResourceType "RouteTable"
Value : [
{
"AddressPrefixes": [
"10.2.0.0/16"
],
"NextHops": [
"/subscriptions/eb40168c-f355-4a18-b13c-5d9751d314c6/resourceGroups/testRg/providers/Microsoft.Network/virtu
alHubs/testHub/hubVirtualNetworkConnections/testConnection"
],
"NextHopType": "Virtual Network Connection",
"RouteOrigin": "/subscriptions/eb40168c-f355-4a18-b13c-5d9751d314c6/resourceGroups/testRg/providers/Microsoft.
Network/virtualHubs/testHub/hubVirtualNetworkConnections/testConnection"
}
]
This command gets the effective routes of the virtual hub default route table.
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 |
-ResourceId
The resource id of a virtual wan 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 |
-VirtualWanResourceType
The virtual wan resource type.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Outputs
Zusammenarbeit auf GitHub
Die Quelle für diesen Inhalt finden Sie auf GitHub, wo Sie auch Issues und Pull Requests erstellen und überprüfen können. Weitere Informationen finden Sie in unserem Leitfaden für Mitwirkende.
Azure PowerShell