Get-AzExpressRouteConnection
이름으로 ExpressRoute 연결을 가져오거나 ExpressRouteGateway에 연결된 모든 ExpressRoute 연결을 나열합니다.
구문
Get-AzExpressRouteConnection
-ResourceGroupName <String>
-ExpressRouteGatewayName <String>
[-Name <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzExpressRouteConnection
-ExpressRouteGatewayObject <PSExpressRouteGateway>
[-Name <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzExpressRouteConnection
-ParentResourceId <String>
[-Name <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
이름으로 ExpressRoute 연결을 가져오거나 ExpressRouteGateway에 연결된 모든 ExpressRoute 연결을 나열합니다.
예제
예 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
$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": []
}
}
위의 내용은 Azure의 "testRG" 리소스 그룹에 리소스 그룹, Virtual WAN, Virtual Network, Virtual Hub 및 ExpressRouteSite를 미국 서부에 만듭니다. ExpressRoute 게이트웨이는 이후 2개의 배율 단위로 가상 허브에 만들어집니다.
게이트웨이가 만들어지면 New-AzExpressRouteConnection 명령을 사용하여 온-프레미스 ExpressRoute 회로에 연결됩니다.
그런 다음 연결 이름을 사용하여 연결을 가져옵니다.
예제 2
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": []
}
}
이 명령은 "test"로 시작하는 ExpressRoute "testExpressRoutegw"의 모든 연결을 가져옵니다.
매개 변수
-DefaultProfile
Azure와의 통신에 사용되는 자격 증명, 계정, 테넌트 및 구독입니다.
형식: | IAzureContextContainer |
별칭: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
필수: | False |
파이프라인 입력 허용: | False |
와일드카드 문자 허용: | False |
-ExpressRouteGatewayName
부모 리소스 이름입니다.
형식: | String |
Position: | Named |
Default value: | None |
필수: | True |
파이프라인 입력 허용: | False |
와일드카드 문자 허용: | False |
-ExpressRouteGatewayObject
이 연결에 대한 부모 ExpressRouteGateway입니다.
형식: | PSExpressRouteGateway |
별칭: | ExpressRouteGateway |
Position: | Named |
Default value: | None |
필수: | True |
파이프라인 입력 허용: | True |
와일드카드 문자 허용: | False |
-Name
리소스 이름.
형식: | String |
별칭: | ResourceName, ExpressRouteConnectionName |
Position: | Named |
Default value: | None |
필수: | False |
파이프라인 입력 허용: | False |
와일드카드 문자 허용: | True |
-ParentResourceId
이 연결에 대한 부모 ExpressRouteGateway의 리소스 ID입니다.
형식: | String |
별칭: | ExpressRouteGatewayId |
Position: | Named |
Default value: | None |
필수: | True |
파이프라인 입력 허용: | True |
와일드카드 문자 허용: | False |
-ResourceGroupName
리소스 그룹 이름입니다.
형식: | String |
Position: | Named |
Default value: | None |
필수: | True |
파이프라인 입력 허용: | False |
와일드카드 문자 허용: | False |