次の方法で共有


Remove-AzVirtualNetworkGatewayDefaultSite

Removes the default site from a virtual network gateway.

構文

Default (既定)

Remove-AzVirtualNetworkGatewayDefaultSite
    -VirtualNetworkGateway <PSVirtualNetworkGateway>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

説明

The Remove-AzVirtualNetworkGatewayDefaultSite cmdlet removes the forced tunneling default site from a virtual network gateway. Forced tunneling provides a way for you to redirect Internet-bound traffic from Azure virtual machines to your on-premises network; this enables you to inspect and audit traffic before releasing it. Forced tunneling is carried out by using a virtual private network (VPN) tunnel; this tunnel requires a default site, a local gateway where all the Azure Internet-bound traffic is redirected.

Remove-AzVirtualNetworkGatewayDefaultSite removes the default site assigned to a gateway. If you do this you will need to use Set-AzVirtualNetworkGatewayDefaultSite to assign a new default site before the gateway can be used for forced tunneling.

Example 1: Remove the default site assigned to a virtual network gateway

PS C:\>$Gateway = Get-AzVirtualNetworkGateway -Name "ContosoVirtualGateway"
PS C:\> Remove-AzVirtualNetworkGatewayDefaultSite -VirtualNetworknGateway $Gateway

This example removes the default site currently assigned to a virtual network gateway named ContosoVirtualGateway.

The first command uses Get-AzVirtualNetworkGateway to create an object reference to the gateway; this object reference is stored in a variable named $Gateway.

The second command then uses Remove-AzVirtualNetworkGatewayDefaultSite to remove the default site assigned to that gateway.

パラメーター

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

パラメーターのプロパティ

型:IAzureContextContainer
規定値:None
ワイルドカードのサポート:False
DontShow:False
Aliases:AzureRmContext, AzureCredential

パラメーター セット

(All)
配置:Named
必須:False
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

-VirtualNetworkGateway

Specifies an object reference to the virtual network gateway containing the default site to be removed. You can create an object reference to a virtual network gateway by using the Get-AzVirtualNetworkGateway and specifying the name of the gateway.

パラメーターのプロパティ

型:PSVirtualNetworkGateway
規定値:None
ワイルドカードのサポート:False
DontShow:False

パラメーター セット

(All)
配置:Named
必須:True
パイプラインからの値:True
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

入力

PSVirtualNetworkGateway

This cmdlet accepts pipelined instances of the Microsoft.Azure.Commands.Network.Models.PSVirtualNetworkGateway object.

出力

PSVirtualNetworkGateway

This cmdlet modifies existing instances of the Microsoft.Azure.Commands.Network.Models.PSVirtualNetworkGateway object.