Remove-AzExpressRouteConnection
ExpressRouteConnection を削除します。
構文
ByExpressRouteConnectionName (既定)
Remove-AzExpressRouteConnection
-ResourceGroupName <String>
-ExpressRouteGatewayName <String>
-Name <String>
[-Force]
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByExpressRouteConnectionResourceId
Remove-AzExpressRouteConnection
-ResourceId <String>
[-Force]
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByExpressRouteConnectionObject
Remove-AzExpressRouteConnection
-InputObject <PSExpressRouteConnection>
[-Force]
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
説明
ExpressRouteConnection を削除します。
例
例 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
Remove-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -ExpressRouteGatewayName $ExpressRouteGateway.Name -Name "testConnection"
上記では、Azure の "testRG" リソース グループに、リソース グループ Virtual WAN、Virtual Network、Virtual Hub を米国西部に作成します。
その後、2 スケール ユニットの仮想ハブに ExpressRoute ゲートウェイが作成されます。
ゲートウェイが作成されると、New-AzExpressRouteConnection コマンドを使用して ExpressRouteSite に接続されます。
次に、接続名を使用して接続を削除します。
例 2
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" | Remove-AzExpressRouteConnection
例 1 と同じですが、Get-AzExpressRouteConnection からパイプされたオブジェクトを使用して接続を削除するようになりました。
パラメーター
-Confirm
コマンドレットを実行する前に確認を求めるメッセージが表示されます。
パラメーターのプロパティ
パラメーター セット
(All)
| 配置: | Named |
| 必須: | False |
| パイプラインからの値: | False |
| プロパティ名別のパイプラインからの値: | False |
| 残りの引数からの値: | False |
-DefaultProfile
Azure との通信のために使用される資格情報、アカウント、テナント、サブスクリプションです。
パラメーターのプロパティ
| 型: | IAzureContextContainer
|
| 規定値: | None |
| ワイルドカードのサポート: | False |
| DontShow: | False |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
パラメーター セット
(All)
| 配置: | Named |
| 必須: | False |
| パイプラインからの値: | False |
| プロパティ名別のパイプラインからの値: | False |
| 残りの引数からの値: | False |
-ExpressRouteGatewayName
親リソース名。
パラメーターのプロパティ
| 型: | String
|
| 規定値: | None |
| ワイルドカードのサポート: | False |
| DontShow: | False |
パラメーター セット
ByExpressRouteConnectionName
| 配置: | Named |
| 必須: | True |
| パイプラインからの値: | False |
| プロパティ名別のパイプラインからの値: | False |
| 残りの引数からの値: | False |
-Force
リソースを上書きする場合は、確認を求めないでください
パラメーターのプロパティ
パラメーター セット
(All)
| 配置: | Named |
| 必須: | False |
| パイプラインからの値: | False |
| プロパティ名別のパイプラインからの値: | False |
| 残りの引数からの値: | False |
更新する ExpressRouteConnection オブジェクト。
ByExpressRouteConnectionObject
| 配置: | Named |
| 必須: | True |
| パイプラインからの値: | True |
| プロパティ名別のパイプラインからの値: | False |
| 残りの引数からの値: | False |
-Name
リソースの名前。
パラメーターのプロパティ
| 型: | String
|
| 規定値: | None |
| ワイルドカードのサポート: | False |
| DontShow: | False |
| Aliases: | ResourceName, ExpressRouteConnectionName |
パラメーター セット
ByExpressRouteConnectionName
| 配置: | Named |
| 必須: | True |
| パイプラインからの値: | False |
| プロパティ名別のパイプラインからの値: | False |
| 残りの引数からの値: | False |
-PassThru
作業中のアイテムを表すオブジェクトを返します。
既定では、このコマンドレットは出力を生成しません。
パラメーターのプロパティ
パラメーター セット
(All)
| 配置: | Named |
| 必須: | False |
| パイプラインからの値: | False |
| プロパティ名別のパイプラインからの値: | False |
| 残りの引数からの値: | False |
-ResourceGroupName
リソース グループ名。
パラメーターのプロパティ
| 型: | String
|
| 規定値: | None |
| ワイルドカードのサポート: | False |
| DontShow: | False |
パラメーター セット
ByExpressRouteConnectionName
| 配置: | Named |
| 必須: | True |
| パイプラインからの値: | False |
| プロパティ名別のパイプラインからの値: | False |
| 残りの引数からの値: | False |
-ResourceId
削除する ExpressRouteConnection オブジェクトのリソース ID。
パラメーターのプロパティ
| 型: | String
|
| 規定値: | None |
| ワイルドカードのサポート: | False |
| DontShow: | False |
| Aliases: | ExpressRouteConnectionId (エクスプレスルート接続ID) |
パラメーター セット
ByExpressRouteConnectionResourceId
| 配置: | Named |
| 必須: | True |
| パイプラインからの値: | False |
| プロパティ名別のパイプラインからの値: | True |
| 残りの引数からの値: | False |
-WhatIf
コマンドレットを実行した場合の動作を示します。
コマンドレットは実行されません。
パラメーターのプロパティ
| 型: | SwitchParameter
|
| 規定値: | None |
| ワイルドカードのサポート: | False |
| DontShow: | False |
| Aliases: | ウィスコンシン |
パラメーター セット
(All)
| 配置: | Named |
| 必須: | False |
| パイプラインからの値: | False |
| プロパティ名別のパイプラインからの値: | False |
| 残りの引数からの値: | False |
CommonParameters
このコマンドレットでは、一般的なパラメーター -Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction、-WarningVariable の各パラメーターがサポートされています。 詳細については、about_CommonParametersを参照してください。
出力