New-AzVpnSiteLinkConnection
Creates an Azure VpnSiteLinkConnection object.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
New-AzVpnSiteLinkConnection
-Name <String>
-VpnSiteLink <PSVpnSiteLink>
[-SharedKey <SecureString>]
[-ConnectionBandwidth <UInt32>]
[-RoutingWeight <UInt32>]
[-IpSecPolicy <PSIpsecPolicy>]
[-VpnConnectionProtocolType <String>]
[-EnableBgp]
[-UseLocalAzureIpAddress]
[-UsePolicyBasedTrafficSelectors]
[-IngressNatRule <PSResourceId[]>]
[-EgressNatRule <PSResourceId[]>]
[-VpnLinkConnectionMode <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Creates an Azure VpnSiteLinkConnection object.
Examples
Example 1
PS C:\> New-AzResourceGroup -Location "West US" -Name "testRG"
PS C:\> $virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West US"
PS C:\> $virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -AddressPrefix "10.0.0.1/24"
PS C:\> New-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -VirtualHubId $virtualHub.Id -VpnGatewayScaleUnit 2
PS C:\> $vpnGateway = Get-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw"
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:\> $vpnSite = New-AzVpnSite -ResourceGroupName "testRG" -Name "testVpnSite" -Location "West US" -VirtualWan $virtualWan -AddressSpace $vpnSiteAddressSpaces -DeviceModel "SomeDevice" -DeviceVendor "SomeDeviceVendor" -VpnSiteLink @($vpnSiteLink)
PS C:\> $vpnSiteLinkConnection = New-AzVpnSiteLinkConnection -Name "testLinkConnection1" -VpnSiteLink $vpnSite.VpnSiteLinks[0] -ConnectionBandwidth 100
PS C:\> New-AzVpnConnection -ResourceGroupName $vpnGateway.ResourceGroupName -ParentResourceName $vpnGateway.Name -Name "testConnection" -VpnSite $vpnSite -VpnSiteLinkConnection @($vpnSiteLinkConnection)
The above will create a resource group, Virtual WAN, Virtual Network, Virtual Hub and a VpnSite with 1 VpnSiteLinks in West US in "testRG" resource group in Azure. A VPN gateway will be created thereafter in the Virtual Hub. Once the gateway has been created, it is connected to the VpnSite using the New-AzVpnConnection command with 1 VpnSiteLinkConnections to the VpnSiteLink of the VpnSite.
Parameters
The bandwidth that needs to be handled by this link connection in mbps.
| Type: | UInt32 |
| 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 list of egress NAT rules that are associated with this link Connection.
| Type: | PSResourceId[] |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Enable BGP for this link connection
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The list of ingress NAT rules that are associated with this link Connection.
| Type: | PSResourceId[] |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
IpSec Policy to be considered for this link connection.
| Type: | PSIpsecPolicy |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Name
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Routing Weight
| Type: | UInt32 |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The shared key required to set this link connection up.
| Type: | SecureString |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Use local azure ip address as source ip for this link connection.
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Use policy based traffic selectors for this link connection.
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Gateway connection protocol:IKEv1/IKEv2
| Type: | String |
| Accepted values: | IKEv1, IKEv2 |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The connection mode for this link connection.
| Type: | String |
| Position: | Named |
| Default value: | Default |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The vpn site link object to connect to.
| Type: | PSVpnSiteLink |
| Aliases: | InputObject |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |