New-AzVpnSiteLinkConnection
Hiermee maakt u een Azure VpnSiteLinkConnection-object.
New-AzVpnSiteLinkConnection
-Name <String>
-VpnSiteLink <PSVpnSiteLink>
[-SharedKey <SecureString>]
[-ConnectionBandwidth <UInt32>]
[-RoutingWeight <UInt32>]
[-IpSecPolicy <PSIpsecPolicy>]
[-VpnConnectionProtocolType <String>]
[-EnableBgp]
[-UseLocalAzureIpAddress]
[-UsePolicyBasedTrafficSelectors]
[-IngressNatRule <PSResourceId[]>]
[-EgressNatRule <PSResourceId[]>]
[-VpnGatewayCustomBgpAddress <PSGatewayCustomBgpIpConfiguration[]>]
[-VpnLinkConnectionMode <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Hiermee maakt u een Azure VpnSiteLinkConnection-object.
New-AzResourceGroup -Location "West US" -Name "testRG"
$virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West US"
$virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -AddressPrefix "10.0.0.1/24"
New-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -VirtualHubId $virtualHub.Id -VpnGatewayScaleUnit 2
$vpnGateway = Get-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw"
$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"
$vpnSite = New-AzVpnSite -ResourceGroupName "testRG" -Name "testVpnSite" -Location "West US" -VirtualWan $virtualWan -AddressSpace $vpnSiteAddressSpaces -DeviceModel "SomeDevice" -DeviceVendor "SomeDeviceVendor" -VpnSiteLink @($vpnSiteLink)
$vpnSiteLinkConnection = New-AzVpnSiteLinkConnection -Name "testLinkConnection1" -VpnSiteLink $vpnSite.VpnSiteLinks[0] -ConnectionBandwidth 100
New-AzVpnConnection -ResourceGroupName $vpnGateway.ResourceGroupName -ParentResourceName $vpnGateway.Name -Name "testConnection" -VpnSite $vpnSite -VpnSiteLinkConnection @($vpnSiteLinkConnection)
Met het bovenstaande maakt u een resourcegroep, Virtual WAN, Virtual Network, Virtual Hub en een VpnSite met 1 VpnSiteLinks in VS - west in de resourcegroep testRG in Azure. Hierna wordt een VPN-gateway gemaakt in de virtuele hub. Zodra de gateway is gemaakt, is deze verbonden met de VpnSite met behulp van de opdracht New-AzVpnConnection met 1 VpnSiteLinkConnections met de VpnSiteLink van de VpnSite.
$vpnSite = Get-AzVpnSite -ResourceGroupName PS_testing -Name testsite
$vpnGateway = Get-AzVpnGateway -ResourceGroupName PS_testing -Name 196ddf92afae40e4b20edc32dfb48a63-eastus-gw
$address = New-AzGatewayCustomBgpIpConfigurationObject -IpConfigurationId "Instance0" -CustomBgpIpAddress "169.254.22.1"
$address2 = New-AzGatewayCustomBgpIpConfigurationObject -IpConfigurationId "Instance1" -CustomBgpIpAddress "169.254.22.3"
$vpnSiteLinkConnection = New-AzVpnSiteLinkConnection -Name "testLinkConnection1" -VpnSiteLink $vpnSite.VpnSiteLinks[0] -ConnectionBandwidth 100 -VpnGatewayCustomBgpAddress $address,$address2 -EnableBgp
New-AzVpnConnection -ResourceGroupName $vpnGateway.ResourceGroupName -ParentResourceName $vpnGateway.Name -Name "testConnection" -VpnSite $vpnSite -VpnSiteLinkConnection @($vpnSiteLinkConnection)
Met het bovenstaande maakt u AzGatewayCustomBgpIpConfigurationObject 1 VpnSiteLinks met VpnConnection in de resourcegroep 'PS_testing' in Azure. Zodra de verbinding is gemaakt, is deze verbonden met de VpnSite met behulp van de opdracht New-AzVpnConnection met 1 VpnSiteLinkConnections met de VpnSiteLink van de VpnSite. Deze verbinding maakt gebruik van de opgegeven GatewayCustomBgpIpAddress voor Bgp-verbinding aan de kant van VpnGateway.
De bandbreedte die moet worden verwerkt door deze koppelingsverbinding in mbps.
Type: | UInt32 |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
De referenties, accounts, tenants en abonnementen die worden gebruikt voor communicatie met Azure.
Type: | IAzureContextContainer |
Aliassen: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
De lijst met uitgaande NAT-regels die zijn gekoppeld aan deze koppelingsverbinding.
Type: | PSResourceId[] |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
BGP inschakelen voor deze koppelingsverbinding
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
De lijst met inkomende NAT-regels die zijn gekoppeld aan deze koppelingsverbinding.
Type: | PSResourceId[] |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
IpSec-beleid dat moet worden overwogen voor deze koppelingsverbinding.
Type: | PSIpsecPolicy |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
VpnSiteLinkConnection-naam
Type: | String |
Position: | Named |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
Gewicht van routering
Type: | UInt32 |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
De gedeelde sleutel die nodig is om deze koppelingsverbinding in te stellen.
Type: | SecureString |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
Gebruik het lokale IP-adres van Azure als bron-IP voor deze koppelingsverbinding.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
Gebruik op beleid gebaseerde verkeerskiezers voor deze koppelingsverbinding.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
Gatewayverbindingsprotocol:IKEv1/IKEv2
Type: | String |
Geaccepteerde waarden: | IKEv1, IKEv2 |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
GatewayCustomBgpIpAddress van Vpngateway die in deze koppelingsverbinding wordt gebruikt.
Type: | PSGatewayCustomBgpIpConfiguration[] |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | True |
Jokertekens accepteren: | False |
De verbindingsmodus voor deze koppelingsverbinding.
Type: | String |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
Het vpn-sitekoppelingsobject waarmee verbinding moet worden gemaakt.
Type: | PSVpnSiteLink |
Aliassen: | InputObject |
Position: | Named |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | True |
Jokertekens accepteren: | False |
Azure PowerShell-feedback
Azure PowerShell is een open source project. Selecteer een koppeling om feedback te geven: