The Virtual Network Gateway is the object representing your gateway in Azure.
The New-AzVirtualNetworkGateway cmdlet creates the object of your gateway in Azure based
on the Name, Resource Group Name, Location, and IP configuration, as well as the Gateway Type and
if VPN, the VPN Type. You can also name the Gateway SKU.
If this Gateway is being used for Point-to-Site connections, you will also need to include the VPN
Client Address Pool from which to assign addresses to connecting clients and the VPN Client Root
Certificate used to authenticate VPN clients connecting to the Gateway.
You can also choose to include other features like BGP and Active-Active.
The above will create a resource group, request a Public IP Address, create a Virtual Network and
subnet and create a Virtual Network Gateway in Azure.
The gateway will be called "myNGW" within the resource group "vnet-gateway" in the location "UK
West" with the previously created IP configurations saved in the variable "ngwIPConfig," the
gateway type of "VPN," the vpn type "RouteBased," and the sku "Basic."
2: Create a Virtual Network Gateway with External Radius Configuration
The above will create a resource group, request a Public IP Address, create a Virtual Network and
subnet and create a Virtual Network Gateway in Azure.
The gateway will be called "myNGW" within the resource group "vnet-gateway" in the location "UK West" with the previously created IP configurations saved in the variable "ngwIPConfig," the gateway type of "VPN," the vpn type "RouteBased," and the sku "Basic." It also adds an external radius server with address "TestRadiusServer"
Parameters
-AsJob
Run cmdlet in the background
Type:
SwitchParameter
Position:
Named
Default value:
None
Required:
False
Accept pipeline input:
False
Accept wildcard characters:
False
-Asn
Type:
UInt32
Position:
Named
Default value:
None
Required:
False
Accept pipeline input:
True
Accept wildcard characters:
False
-Confirm
Prompts you for confirmation before running the cmdlet.
Type:
SwitchParameter
Aliases:
cf
Position:
Named
Default value:
False
Required:
False
Accept pipeline input:
False
Accept wildcard characters:
False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type:
IAzureContextContainer
Aliases:
AzureRmContext, AzureCredential
Position:
Named
Default value:
None
Required:
False
Accept pipeline input:
False
Accept wildcard characters:
False
-EnableActiveActiveFeature
Enables the active-active feature.
Type:
SwitchParameter
Position:
Named
Default value:
None
Required:
False
Accept pipeline input:
False
Accept wildcard characters:
False
-EnableBgp
Type:
Boolean
Position:
Named
Default value:
None
Required:
False
Accept pipeline input:
True
Accept wildcard characters:
False
-Force
Forces the command to run without asking for user confirmation.