Get-AzExpressRouteGateway
Obtém um recurso do ExpressRouteGateway usando ResourceGroupName e GatewayName OR lista todos os gateways por ResourceGroupName ou SubscriptionId.
Sintaxe
Get-AzExpressRouteGateway
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzExpressRouteGateway
[-ResourceGroupName <String>]
[-Name <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzExpressRouteGateway
-ResourceId <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Obtém um recurso do ExpressRouteGateway usando ResourceGroupName e GatewayName OR lista todos os gateways por ResourceGroupName ou SubscriptionId.
Exemplos
Exemplo 1
New-AzResourceGroup -Location "West Central US" -Name "testRG"
$virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West Central US"
$virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -AddressPrefix "10.0.0.1/24"
New-AzExpressRouteGateway -ResourceGroupName "testRG" -Name "testExpressRoutegw" -VirtualHubId $virtualHub.Id -MinScaleUnits 2
Get-AzExpressRouteGateway -ResourceGroupName "testRG" -Name "testExpressRoutegw"
ResourceGroupName : testRG
Name : testExpressRoutegw
Id : /subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/ExpressRouteGateways/testExpressRoutegw
Location : West Central US
ExpressRouteGatewayScaleUnit : 2
VirtualHub : /subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/virtualHubs/westushub
BgpSettings : {}
Type : Microsoft.Network/ExpressRouteGateways
ProvisioningState : Succeeded
O acima criará um grupo de recursos, WAN Virtual, Rede Virtual, Hub Virtual no Centro-Oeste dos EUA no grupo de recursos "testRG" no Azure. Um gateway do ExpressRoute será criado posteriormente no Hub Virtual com duas unidades de escala.
Em seguida, ele obtém o ExpressRouteGateway usando seu resourceGroupName e o nome do gateway.
Exemplo 2
Get-AzExpressRouteGateway -Name test*
ResourceGroupName : testRG
Name : testExpressRoutegw1
Id : /subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/ExpressRouteGateways/testExpressRoutegw1
Location : West Central US
ExpressRouteGatewayScaleUnit : 2
VirtualHub : /subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/virtualHubs/westushub
BgpSettings : {}
Type : Microsoft.Network/ExpressRouteGateways
ProvisioningState : Succeeded
ResourceGroupName : testRG
Name : testExpressRoutegw2
Id : /subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/ExpressRouteGateways/testExpressRoutegw2
Location : West Central US
ExpressRouteGatewayScaleUnit : 2
VirtualHub : /subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/virtualHubs/westushub
BgpSettings : {}
Type : Microsoft.Network/ExpressRouteGateways
ProvisioningState : Succeeded
Esse comando obterá todos os ExpressRouteGateways que começam com "test"
Parâmetros
-DefaultProfile
As credenciais, a conta, o locatário e a assinatura usados para comunicação com o Azure.
Tipo: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Cargo: | Named |
Valor padrão: | None |
Obrigatório: | False |
Aceitar a entrada de pipeline: | False |
Aceitar caracteres curinga: | False |
-Name
O nome do recurso.
Tipo: | String |
Aliases: | ResourceName, ExpressRouteGatewayName |
Cargo: | Named |
Valor padrão: | None |
Obrigatório: | False |
Aceitar a entrada de pipeline: | False |
Aceitar caracteres curinga: | True |
-ResourceGroupName
O nome do grupo de recursos.
Tipo: | String |
Cargo: | Named |
Valor padrão: | None |
Obrigatório: | False |
Aceitar a entrada de pipeline: | False |
Aceitar caracteres curinga: | True |
-ResourceId
A ID de recurso do Azure para o expressRouteGateway a ser excluída.
Tipo: | String |
Aliases: | expressRouteGatewayId |
Cargo: | Named |
Valor padrão: | None |
Obrigatório: | True |
Aceitar a entrada de pipeline: | True |
Aceitar caracteres curinga: | False |
Entradas
Saídas
Azure PowerShell