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.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
New-AzVpnSite
-ResourceGroupName <String>
-Name <String>
-Location <String>
-VirtualWanResourceGroupName <String>
-VirtualWanName <String>
-IpAddress <String>
[-AddressSpace <String[]>]
[-DeviceModel <String>]
[-DeviceVendor <String>]
[-LinkSpeedInMbps <UInt32>]
[-BgpAsn <UInt32>]
[-BgpPeeringAddress <String>]
[-BgpPeeringWeight <UInt32>]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzVpnSite
-ResourceGroupName <String>
-Name <String>
-Location <String>
-VirtualWanResourceGroupName <String>
-VirtualWanName <String>
[-AddressSpace <String[]>]
[-DeviceModel <String>]
[-DeviceVendor <String>]
-VpnSiteLink <PSVpnSiteLink[]>
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzVpnSite
-ResourceGroupName <String>
-Name <String>
-Location <String>
-VirtualWan <PSVirtualWan>
-IpAddress <String>
[-AddressSpace <String[]>]
[-DeviceModel <String>]
[-DeviceVendor <String>]
[-LinkSpeedInMbps <UInt32>]
[-BgpAsn <UInt32>]
[-BgpPeeringAddress <String>]
[-BgpPeeringWeight <UInt32>]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzVpnSite
-ResourceGroupName <String>
-Name <String>
-Location <String>
-VirtualWan <PSVirtualWan>
[-AddressSpace <String[]>]
[-DeviceModel <String>]
[-DeviceVendor <String>]
-VpnSiteLink <PSVpnSiteLink[]>
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzVpnSite
-ResourceGroupName <String>
-Name <String>
-Location <String>
-VirtualWanId <String>
-IpAddress <String>
[-AddressSpace <String[]>]
[-DeviceModel <String>]
[-DeviceVendor <String>]
[-LinkSpeedInMbps <UInt32>]
[-BgpAsn <UInt32>]
[-BgpPeeringAddress <String>]
[-BgpPeeringWeight <UInt32>]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzVpnSite
-ResourceGroupName <String>
-Name <String>
-Location <String>
-VirtualWanId <String>
[-AddressSpace <String[]>]
[-DeviceModel <String>]
[-DeviceVendor <String>]
-VpnSiteLink <PSVpnSiteLink[]>
[-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
PS C:\> New-AzResourceGroup -Location "East US" -Name "nonlinkSite"
PS C:\> $virtualWan = New-AzVirtualWan -ResourceGroupName "nonlinkSite" -Name myVirtualWAN -Location "East US"
PS C:\> $vpnSiteAddressSpaces = New-Object string[] 2
PS C:\> $vpnSiteAddressSpaces[0] = "192.168.2.0/24"
PS C:\> $vpnSiteAddressSpaces[1] = "192.168.3.0/24"
PS C:\> 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
PS C:\> New-AzResourceGroup -Location "East US" -Name "multilink"
PS C:\> $virtualWan = New-AzVirtualWan -ResourceGroupName multilink -Name myVirtualWAN -Location "East US"
PS C:\> $vpnSiteAddressSpaces = New-Object string[] 2
PS C:\> $vpnSiteAddressSpaces[0] = "192.168.2.0/24"
PS C:\> $vpnSiteAddressSpaces[1] = "192.168.3.0/24"
PS C:\> $vpnSiteLink = New-AzVpnSiteLink -Name "testVpnSiteLink1" -IpAddress "15.25.35.45" -LinkProviderName "SomeTelecomProvider" -LinkSpeedInMbps "10"
PS C:\> $vpnSiteLink2 = New-AzVpnSiteLink -Name "testVpnSiteLink2" -IpAddress "15.25.35.55" -LinkProviderName "SomeTelecomProvider2" -LinkSpeedInMbps "100"
PS C:\> $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
The address prefixes of the virtual network.
| Type: | String[] |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Run cmdlet in the background
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The BGP ASN for this VpnSite.
| Type: | UInt32 |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The BGP Peering Address for this VpnSite.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The BGP Peering weight for this VpnSite.
| Type: | UInt32 |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Prompts you for confirmation before running the cmdlet.
| Type: | SwitchParameter |
| Aliases: | cf |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with Azure.
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The device model of the remote vpn device.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The device vendor of the remote vpn device.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The IPAddress for this VpnSite.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The device model of the remote vpn device.
| Type: | UInt32 |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The resource location.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The resource name.
| Type: | String |
| Aliases: | ResourceName, VpnSiteName |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The office 365 traffic breakout policy for this VpnSite.
| Type: | PSO365PolicyProperties |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The resource name.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
A hashtable which represents resource tags.
| Type: | Hashtable |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The VirtualWan this VpnSite needs to be connected to.
| Type: | PSVirtualWan |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The ResourceId VirtualWan this VpnSite needs to be connected to.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The name of the VirtualWan this VpnSite needs to be connected to.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The resource group name of the VirtualWan this VpnSite needs to be connected to.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The list of VpnSiteLinks that this VpnSite have.
| Type: | PSVpnSiteLink[] |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
| Type: | SwitchParameter |
| Aliases: | wi |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Inputs
None