< Back

Remove-AzureRmVirtualNetworkGatewayDefaultSite

Tue Jan 29, 2019 9:57 pm

NAME Remove-AzureRmVirtualNetworkGatewayDefaultSite



SYNOPSIS

Removes the default site from a virtual network gateway.





SYNTAX

Remove-AzureRmVirtualNetworkGatewayDefaultSite [-DefaultProfile <IAzureContextContainer>] -VirtualNetworkGateway <PSVirtualNetworkGateway>

[<CommonParameters>]





DESCRIPTION

The Remove-AzureRmVirtualNetworkGatewayDefaultSite 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-AzureRmVirtualNetworkGatewayDefaultSite

removes the default site assigned to a gateway. If you do this you will need to use Set-AzureRmVirtualNetworkGatewayDefaultSite to assign a new

default site before the gateway can be used for forced tunneling.





PARAMETERS

-DefaultProfile <IAzureContextContainer>

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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-VirtualNetworkGateway <PSVirtualNetworkGateway>

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-AzureRmVirtualNetworkGateway and specifying the name of the gateway.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



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





OUTPUTS



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





NOTES









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



PS C:\\>$Gateway = Get-AzureRmVirtualNetworkGateway -Name "ContosoVirtualGateway"

PS C:\\> Remove-AzureRmVirtualNetworkGatewayDefaultSite -VirtualNetworknGateway $Gateway



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



The first command uses Get-AzureRmVirtualNetworkGateway to create an object reference to the gateway; this object reference is stored in a

variable named $Gateway.



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







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... efaultsite

Get-AzureRmVirtualNetworkGateway

Set-AzureRmVirtualNetworkGatewayDefaultSite