Get-AzExpressRouteConnection

Lekéri az ExpressRoute-kapcsolatot név alapján, vagy felsorolja az ExpressRouteGatewayhez csatlakoztatott összes ExpressRoute-kapcsolatot.

Syntax

ByExpressRouteGatewayName (Alapértelmezett)

Get-AzExpressRouteConnection
    -ResourceGroupName <String>
    -ExpressRouteGatewayName <String>
    [-Name <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

ByExpressRouteGatewayObject

Get-AzExpressRouteConnection
    -ExpressRouteGatewayObject <PSExpressRouteGateway>
    [-Name <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

ByExpressRouteGatewayResourceId

Get-AzExpressRouteConnection
    -ParentResourceId <String>
    [-Name <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

Lekéri az ExpressRoute-kapcsolatot név alapján, vagy felsorolja az ExpressRouteGatewayhez csatlakoztatott összes ExpressRoute-kapcsolatot.

Példák

1. példa

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
$ExpressRouteGateway = Get-AzExpressRouteGateway -ResourceGroupName "testRG" -Name "testExpressRoutegw"
$ExpressRouteCircuit = New-AzExpressRouteCircuit -ResourceGroupName "testRG" -Name "testExpressRouteCircuit" -Location "West Central US" -SkuTier Premium -SkuFamily MeteredData -ServiceProviderName "Equinix" -PeeringLocation "Silicon Valley" -BandwidthInMbps 200
Add-AzExpressRouteCircuitPeeringConfig -Name "AzurePrivatePeering" -ExpressRouteCircuit $ExpressRouteCircuit -PeeringType AzurePrivatePeering -PeerASN 100 -PrimaryPeerAddressPrefix "123.0.0.0/30" -SecondaryPeerAddressPrefix "123.0.0.4/30" -VlanId 300
$ExpressRouteCircuit = Set-AzExpressRouteCircuit -ExpressRouteCircuit $ExpressRouteCircuit
$ExpressRouteCircuitPeeringId = $ExpressRouteCircuit.Peerings[0].Id
New-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -ExpressRouteGatewayName $ExpressRouteGateway.Name -Name "testConnection" -ExpressRouteCircuitPeeringId $ExpressRouteCircuitPeeringId -RoutingWeight 20
Get-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -ExpressRouteGatewayName $ExpressRouteGateway.Name -Name "testConnection"
ExpressRouteCircuitPeeringId       : Microsoft.Azure.Commands.Network.Models.PSResourceId
AuthorizationKey                   :
RoutingWeight                      : 20
ProvisioningState                  : Succeeded
Name                               : testConnection
Etag                               : W/"00000000-0000-0000-0000-000000000000"
Id                                 : /subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/ExpressRouteGateways/testExpressRoutegw/expressRouteConnections/testConnection
EnableInternetSecurity             : False
RoutingConfiguration               : {
                                       "AssociatedRouteTable": {
                                         "Id": "/subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/virtualHubs/westushub/hubRouteTables/defaultRouteTable"
                                       },
                                       "PropagatedRouteTables": {
                                         "Labels": [],
                                         "Ids": [
                                           {
                                             "Id": "/subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/virtualHubs/westushub/hubRouteTables/defaultRouteTable"
                                           }
                                         ]
                                       },
                                       "VnetRoutes": {
                                         "StaticRoutes": []
                                       }
                                     }

A fentiek létrehoznak egy erőforráscsoportot, Virtual WAN, Virtual Network, virtual hubot és expressRouteSite-t az USA nyugati régiójában a "testRG" erőforráscsoportban Azure. Ezt követően létrejön egy ExpressRoute-átjáró a Virtual Hubon 2 méretezési egységgel.

Az átjáró létrehozása után az New-AzExpressRouteConnection paranccsal csatlakozik a helyszíni ExpressRoute-kapcsolatcsoporthoz.

Ezután a kapcsolat nevét használva kapja meg a kapcsolatot.

2. példa

Get-AzExpressRouteConnection -ResourceGroupName ps9361 -ExpressRouteGatewayName testExpressRoutegw -Name test*
ExpressRouteCircuitPeeringId       : Microsoft.Azure.Commands.Network.Models.PSResourceId
AuthorizationKey                   :
RoutingWeight                      : 20
ProvisioningState                  : Succeeded
Name                               : testConnection1
Etag                               : W/"00000000-0000-0000-0000-000000000000"
Id                                 : /subscriptions/{subscriptionId}/resourceGroups/ps9361/providers/Microsoft.Network/ExpressRouteGateways/testExpressRoutegw/expressRouteConnections/testConnection1
EnableInternetSecurity             : False
RoutingConfiguration               : {
                                       "AssociatedRouteTable": {
                                         "Id": "/subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/virtualHubs/westushub/hubRouteTables/defaultRouteTable"
                                       },
                                       "PropagatedRouteTables": {
                                         "Labels": [],
                                         "Ids": [
                                           {
                                             "Id": "/subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/virtualHubs/westushub/hubRouteTables/defaultRouteTable"
                                           }
                                         ]
                                       },
                                       "VnetRoutes": {
                                         "StaticRoutes": []
                                       }
                                     }

ExpressRouteCircuitPeeringId       : Microsoft.Azure.Commands.Network.Models.PSResourceId
AuthorizationKey                   :
RoutingWeight                      : 20
ProvisioningState                  : Succeeded
Name                               : testConnection2
Etag                               : W/"00000000-0000-0000-0000-000000000000"
Id                                 : /subscriptions/{subscriptionId}/resourceGroups/ps9361/providers/Microsoft.Network/ExpressRouteGateways/testExpressRoutegw/expressRouteConnections/testConnection2
EnableInternetSecurity             : False
RoutingConfiguration               : {
                                       "AssociatedRouteTable": {
                                         "Id": "/subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/virtualHubs/westushub/hubRouteTables/defaultRouteTable"
                                       },
                                       "PropagatedRouteTables": {
                                         "Labels": [],
                                         "Ids": [
                                           {
                                             "Id": "/subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/virtualHubs/westushub/hubRouteTables/defaultRouteTable"
                                           }
                                         ]
                                       },
                                       "VnetRoutes": {
                                         "StaticRoutes": []
                                       }
                                     }

Ez a parancs lekéri az ExpressRoute "testExpressRoutegw" összes olyan kapcsolatát, amely a "test" paranccsal kezdődik

Paraméterek

-DefaultProfile

A Azure való kommunikációhoz használt hitelesítő adatok, fiók, bérlő és előfizetés.

Paramétertulajdonságok

Típus:IAzureContextContainer
Alapértelmezett érték:None
Támogatja a helyettesítő karaktereket:False
DontShow:False
Aliasok:AzContext, AzureRmContext, AzureCredential

Paraméterkészletek

(All)
Position:Named
Kötelező:False
Folyamatból származó érték:False
Folyamatból származó érték tulajdonságnév alapján:False
Fennmaradó argumentumokból származó érték:False

-ExpressRouteGatewayName

A szülőerőforrás neve.

Paramétertulajdonságok

Típus:String
Alapértelmezett érték:None
Támogatja a helyettesítő karaktereket:False
DontShow:False

Paraméterkészletek

ByExpressRouteGatewayName
Position:Named
Kötelező:True
Folyamatból származó érték:False
Folyamatból származó érték tulajdonságnév alapján:False
Fennmaradó argumentumokból származó érték:False

-ExpressRouteGatewayObject

A kapcsolat szülő ExpressRouteGatewayje.

Paramétertulajdonságok

Típus:PSExpressRouteGateway
Alapértelmezett érték:None
Támogatja a helyettesítő karaktereket:False
DontShow:False
Aliasok:ExpressRouteGateway

Paraméterkészletek

ByExpressRouteGatewayObject
Position:Named
Kötelező:True
Folyamatból származó érték:True
Folyamatból származó érték tulajdonságnév alapján:False
Fennmaradó argumentumokból származó érték:False

-Name

Az erőforrás neve.

Paramétertulajdonságok

Típus:String
Alapértelmezett érték:None
Támogatja a helyettesítő karaktereket:True
DontShow:False
Aliasok:ResourceName, ExpressRouteConnectionName

Paraméterkészletek

(All)
Position:Named
Kötelező:False
Folyamatból származó érték:False
Folyamatból származó érték tulajdonságnév alapján:False
Fennmaradó argumentumokból származó érték:False

-ParentResourceId

A kapcsolat szülő ExpressRouteGateway-erőforrás-azonosítója.

Paramétertulajdonságok

Típus:String
Alapértelmezett érték:None
Támogatja a helyettesítő karaktereket:False
DontShow:False
Aliasok:ExpressRouteGatewayId

Paraméterkészletek

ByExpressRouteGatewayResourceId
Position:Named
Kötelező:True
Folyamatból származó érték:False
Folyamatból származó érték tulajdonságnév alapján:True
Fennmaradó argumentumokból származó érték:False

-ResourceGroupName

Az erőforráscsoport neve.

Paramétertulajdonságok

Típus:String
Alapértelmezett érték:None
Támogatja a helyettesítő karaktereket:False
DontShow:False

Paraméterkészletek

ByExpressRouteGatewayName
Position:Named
Kötelező:True
Folyamatból származó érték:False
Folyamatból származó érték tulajdonságnév alapján:False
Fennmaradó argumentumokból származó érték:False

CommonParameters

Ez a parancsmag a következő gyakori paramétereket támogatja: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction és -WarningVariable. További információért lásd about_CommonParameters.

Bevitelek

String

Kimenetek

PSExpressRouteConnection