Edit

Share via


New-AzVpnSite

Creates a new Azure VpnSite resource. This is an RM representation of customer branches that are uploaded to Azure for S2S connectivity with a Cortex virtual hub.

Syntax

ByVirtualWanNameByVpnSiteIpAddress (Default)

New-AzVpnSite
    -ResourceGroupName <String>
    -Name <String>
    -Location <String>
    -VirtualWanResourceGroupName <String>
    -VirtualWanName <String>
    -IpAddress <String>
    [-AddressSpace <String[]>]
    [-DeviceModel <String>]
    [-DeviceVendor <String>]
    [-IsSecuritySite]
    [-LinkSpeedInMbps <UInt32>]
    [-BgpAsn <UInt32>]
    [-BgpPeeringAddress <String>]
    [-BgpPeeringWeight <UInt32>]
    [-O365Policy <PSO365PolicyProperties>]
    [-Tag <Hashtable>]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByVirtualWanNameByVpnSiteLinkObject

New-AzVpnSite
    -ResourceGroupName <String>
    -Name <String>
    -Location <String>
    -VirtualWanResourceGroupName <String>
    -VirtualWanName <String>
    -VpnSiteLink <PSVpnSiteLink[]>
    [-AddressSpace <String[]>]
    [-DeviceModel <String>]
    [-DeviceVendor <String>]
    [-IsSecuritySite]
    [-O365Policy <PSO365PolicyProperties>]
    [-Tag <Hashtable>]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByVirtualWanObjectByVpnSiteIpAddress

New-AzVpnSite
    -ResourceGroupName <String>
    -Name <String>
    -Location <String>
    -VirtualWan <PSVirtualWan>
    -IpAddress <String>
    [-AddressSpace <String[]>]
    [-DeviceModel <String>]
    [-DeviceVendor <String>]
    [-IsSecuritySite]
    [-LinkSpeedInMbps <UInt32>]
    [-BgpAsn <UInt32>]
    [-BgpPeeringAddress <String>]
    [-BgpPeeringWeight <UInt32>]
    [-O365Policy <PSO365PolicyProperties>]
    [-Tag <Hashtable>]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByVirtualWanObjectByVpnSiteLinkObject

New-AzVpnSite
    -ResourceGroupName <String>
    -Name <String>
    -Location <String>
    -VirtualWan <PSVirtualWan>
    -VpnSiteLink <PSVpnSiteLink[]>
    [-AddressSpace <String[]>]
    [-DeviceModel <String>]
    [-DeviceVendor <String>]
    [-IsSecuritySite]
    [-O365Policy <PSO365PolicyProperties>]
    [-Tag <Hashtable>]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByVirtualWanResourceIdByVpnSiteIpAddress

New-AzVpnSite
    -ResourceGroupName <String>
    -Name <String>
    -Location <String>
    -VirtualWanId <String>
    -IpAddress <String>
    [-AddressSpace <String[]>]
    [-DeviceModel <String>]
    [-DeviceVendor <String>]
    [-IsSecuritySite]
    [-LinkSpeedInMbps <UInt32>]
    [-BgpAsn <UInt32>]
    [-BgpPeeringAddress <String>]
    [-BgpPeeringWeight <UInt32>]
    [-O365Policy <PSO365PolicyProperties>]
    [-Tag <Hashtable>]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByVirtualWanResourceIdByVpnSiteLinkObject

New-AzVpnSite
    -ResourceGroupName <String>
    -Name <String>
    -Location <String>
    -VirtualWanId <String>
    -VpnSiteLink <PSVpnSiteLink[]>
    [-AddressSpace <String[]>]
    [-DeviceModel <String>]
    [-DeviceVendor <String>]
    [-IsSecuritySite]
    [-O365Policy <PSO365PolicyProperties>]
    [-Tag <Hashtable>]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Creates a new Azure VpnSite resource. This is an RM representation of customer branches that are uploaded to Azure for S2S connectivity with a Cortex virtual hub.

Examples

Example 1

New-AzResourceGroup -Location "East US" -Name "nonlinkSite"
$virtualWan = New-AzVirtualWan -ResourceGroupName "nonlinkSite" -Name myVirtualWAN -Location "East US"

$vpnSiteAddressSpaces = New-Object string[] 2
$vpnSiteAddressSpaces[0] = "192.168.2.0/24"
$vpnSiteAddressSpaces[1] = "192.168.3.0/24"

New-AzVpnSite -ResourceGroupName "nonlinkSite" -Name "testVpnSite" -Location "East US" -VirtualWan $virtualWan -IpAddress "1.2.3.4" -AddressSpace $vpnSiteAddressSpaces -DeviceModel "SomeDevice" -DeviceVendor "SomeDeviceVendor" -LinkSpeedInMbps "10"
ResourceGroupName : nonlinkSite
Name              : testVpnSite
Id                : /subscriptions/{subscriptionId}/resourceGroups/nonlinkSite/providers/Microsoft.Network/vpnSites/testVpnSite
Location          : eastus2euap
IpAddress         : 1.2.3.4
VirtualWan        : /subscriptions/{subscriptionId}/resourceGroups/nonlinkSite/providers/Microsoft.Network/virtualWans/myVirtualWAN
AddressSpace      : {192.168.2.0/24, 192.168.3.0/24}
BgpSettings       :
Type              : Microsoft.Network/vpnSites
ProvisioningState : Succeeded

The above will create a resource group, Virtual WAN in East US in "nonlinkSite" resource group in Azure.

Then it creates a VpnSite to represent a customer branch and links it to the Virtual WAN.

An IPSec connection can then be setup with this branch and a VpnGateway using the New-AzVpnConnection command.

Example 2

New-AzResourceGroup -Location "East US" -Name "multilink"
$virtualWan = New-AzVirtualWan -ResourceGroupName multilink -Name myVirtualWAN -Location "East US"
$vpnSiteAddressSpaces = New-Object string[] 2
$vpnSiteAddressSpaces[0] = "192.168.2.0/24"
$vpnSiteAddressSpaces[1] = "192.168.3.0/24"

$vpnSiteLink = New-AzVpnSiteLink -Name "testVpnSiteLink1" -IpAddress "15.25.35.45" -LinkProviderName "SomeTelecomProvider" -LinkSpeedInMbps "10"
$vpnSiteLink2 = New-AzVpnSiteLink -Name "testVpnSiteLink2" -IpAddress "15.25.35.55" -LinkProviderName "SomeTelecomProvider2" -LinkSpeedInMbps "100"
$vpnSite = New-AzVpnSite -ResourceGroupName "multilink" -Name "testVpnSite" -Location "East US" -VirtualWan $virtualWan -AddressSpace $vpnSiteAddressSpaces -DeviceModel "SomeDevice" -DeviceVendor "SomeDeviceVendor" -VpnSiteLink @($vpnSiteLink1, $vpnSiteLink2)

The above will create a resource group, Virtual WAN and a VpnSite with 1 VpnSiteLinks in East US in "multilink" resource group in Azure.

Example 3

Creates a new Azure VpnSite resource. (autogenerated)

New-AzVpnSite -AddressSpace <String[]> -DeviceModel 'SomeDevice' -DeviceVendor 'SomeDeviceVendor' -IpAddress '1.2.3.4' -LinkSpeedInMbps '10' -Location 'East US' -Name 'testVpnSite' -ResourceGroupName 'multilink' -VirtualWanName <String> -VirtualWanResourceGroupName <String>

Parameters

-AddressSpace

The address prefixes of the virtual network.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-AsJob

Run cmdlet in the background

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-BgpAsn

The BGP ASN for this VpnSite.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByVirtualWanNameByVpnSiteIpAddress
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ByVirtualWanObjectByVpnSiteIpAddress
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ByVirtualWanResourceIdByVpnSiteIpAddress
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-BgpPeeringAddress

The BGP Peering Address for this VpnSite.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByVirtualWanNameByVpnSiteIpAddress
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ByVirtualWanObjectByVpnSiteIpAddress
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ByVirtualWanResourceIdByVpnSiteIpAddress
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-BgpPeeringWeight

The BGP Peering weight for this VpnSite.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByVirtualWanNameByVpnSiteIpAddress
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ByVirtualWanObjectByVpnSiteIpAddress
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ByVirtualWanResourceIdByVpnSiteIpAddress
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

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

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DeviceModel

The device model of the remote vpn device.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DeviceVendor

The device vendor of the remote vpn device.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-IpAddress

The IPAddress for this VpnSite.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByVirtualWanNameByVpnSiteIpAddress
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ByVirtualWanObjectByVpnSiteIpAddress
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ByVirtualWanResourceIdByVpnSiteIpAddress
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-IsSecuritySite

if vpn site is a security site.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LinkSpeedInMbps

The device model of the remote vpn device.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByVirtualWanNameByVpnSiteIpAddress
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ByVirtualWanObjectByVpnSiteIpAddress
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ByVirtualWanResourceIdByVpnSiteIpAddress
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Location

The resource location.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

The resource name.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:ResourceName, VpnSiteName

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-O365Policy

The office 365 traffic breakout policy for this VpnSite.

Parameter properties

Type:PSO365PolicyProperties
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceGroupName

The resource name.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Tag

A hashtable which represents resource tags.

Parameter properties

Type:Hashtable
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VirtualWan

The VirtualWan this VpnSite needs to be connected to.

Parameter properties

Type:PSVirtualWan
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByVirtualWanObjectByVpnSiteIpAddress
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ByVirtualWanObjectByVpnSiteLinkObject
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VirtualWanId

The ResourceId VirtualWan this VpnSite needs to be connected to.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByVirtualWanResourceIdByVpnSiteIpAddress
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ByVirtualWanResourceIdByVpnSiteLinkObject
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VirtualWanName

The name of the VirtualWan this VpnSite needs to be connected to.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByVirtualWanNameByVpnSiteIpAddress
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ByVirtualWanNameByVpnSiteLinkObject
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VirtualWanResourceGroupName

The resource group name of the VirtualWan this VpnSite needs to be connected to.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByVirtualWanNameByVpnSiteIpAddress
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ByVirtualWanNameByVpnSiteLinkObject
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

The list of VpnSiteLinks that this VpnSite have.

Type:

PSVpnSiteLink[]

Default value:None
Supports wildcards:False
DontShow:False
ByVirtualWanNameByVpnSiteLinkObject
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ByVirtualWanObjectByVpnSiteLinkObject
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ByVirtualWanResourceIdByVpnSiteLinkObject
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Inputs

None

Outputs

PSVpnSite