New-AzVpnGateway
Hiermee maakt u een schaalbare VPN-gateway.
Syntaxis
New-AzVpnGateway
-ResourceGroupName <String>
-Name <String>
-VpnGatewayScaleUnit <UInt32>
-VirtualHubName <String>
[-VpnConnection <PSVpnConnection[]>]
[-EnableRoutingPreferenceInternetFlag]
[-EnableBgpRouteTranslationForNat]
[-VpnGatewayNatRule <PSVpnGatewayNatRule[]>]
[-Tag <Hashtable>]
[-Asn <UInt32>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzVpnGateway
-ResourceGroupName <String>
-Name <String>
-VpnGatewayScaleUnit <UInt32>
-VirtualHub <PSVirtualHub>
[-VpnConnection <PSVpnConnection[]>]
[-EnableRoutingPreferenceInternetFlag]
[-EnableBgpRouteTranslationForNat]
[-VpnGatewayNatRule <PSVpnGatewayNatRule[]>]
[-Tag <Hashtable>]
[-Asn <UInt32>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzVpnGateway
-ResourceGroupName <String>
-Name <String>
-VpnGatewayScaleUnit <UInt32>
-VirtualHubId <String>
[-VpnConnection <PSVpnConnection[]>]
[-EnableRoutingPreferenceInternetFlag]
[-EnableBgpRouteTranslationForNat]
[-VpnGatewayNatRule <PSVpnGatewayNatRule[]>]
[-Tag <Hashtable>]
[-Asn <UInt32>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
New-AzVpnGateway maakt een schaalbare VPN-gateway. Dit is software-gedefinieerde connectiviteit voor site-naar-siteverbindingen in VirtualHub.
Deze gateway wijzigt de grootte en schaalaanpassingen op basis van de schaaleenheid die is opgegeven in deze of de Set-AzVpnGateway cmdlet.
Er wordt een verbinding ingesteld vanaf een vertakking/site die VPNSite wordt genoemd naar de schaalbare gateway. Elke verbinding bestaat uit 2 Active-Active tunnels.
De VpnGateway bevindt zich op dezelfde locatie als de waarnaar wordt verwezen VirtualHub.
Voorbeelden
Voorbeeld 1
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 -EnableRoutingPreferenceInternetFlag
ResourceGroupName : testRG
Name : testvpngw
Id : /subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/vpnGateways/testvpngw
Location : West US
VpnGatewayScaleUnit : 2
VirtualHub : /subscriptions/{subscriptionId}/resourceGroups/Ali_pS_Test/providers/Microsoft.Network/virtualHubs/westushub
BgpSettings : {}
Type : Microsoft.Network/vpnGateways
ProvisioningState : Succeeded
Met het bovenstaande maakt u een resourcegroep, Virtual WAN, Virtual Network, Virtual Hub in VS - west in resourcegroep testRG in Azure. Hierna wordt een VPN-gateway gemaakt in de virtuele hub met 2 schaaleenheden.
Parameters
-AsJob
Cmdlet op de achtergrond uitvoeren
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-Asn
De ASN van de VPN-gateway voor BGP via VPN
Type: | UInt32 |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-Confirm
U wordt gevraagd om bevestiging voordat u de cmdlet uitvoert.
Type: | SwitchParameter |
Aliassen: | cf |
Position: | Named |
Default value: | False |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-DefaultProfile
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 |
-EnableBgpRouteTranslationForNat
Vlag om Bgp-routeomzetting in te schakelen voor NAT op deze VpnGateway.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-EnableRoutingPreferenceInternetFlag
Vlag om Routeringsvoorkeur internet in te schakelen op deze VpnGateway.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-Name
De resourcenaam.
Type: | String |
Aliassen: | ResourceName, VpnGatewayName |
Position: | Named |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-ResourceGroupName
De resourcenaam.
Type: | String |
Position: | Named |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-Tag
Een hashtabel die resourcetags vertegenwoordigt.
Type: | Hashtable |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-VirtualHub
De VirtualHub waaraan deze VpnGateway moet worden gekoppeld.
Type: | PSVirtualHub |
Position: | Named |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | True |
Jokertekens accepteren: | False |
-VirtualHubId
De id van de VirtualHub waaraan deze VpnGateway moet worden gekoppeld.
Type: | String |
Position: | Named |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | True |
Jokertekens accepteren: | False |
-VirtualHubName
De id van de VirtualHub waaraan deze VpnGateway moet worden gekoppeld.
Type: | String |
Position: | Named |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-VpnConnection
De lijst met VpnConnections die deze VpnGateway nodig heeft.
Type: | PSVpnConnection[] |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-VpnGatewayNatRule
De lijst met VpnGatewayNatRules die zijn gekoppeld aan deze VpnGateway.
Type: | PSVpnGatewayNatRule[] |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-VpnGatewayScaleUnit
De schaaleenheid voor deze VpnGateway.
Type: | UInt32 |
Position: | Named |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-WhatIf
Toont wat er zou gebeuren als de cmdlet wordt uitgevoerd. De cmdlet wordt niet uitgevoerd.
Type: | SwitchParameter |
Aliassen: | wi |
Position: | Named |
Default value: | False |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
Invoerwaarden
Uitvoerwaarden
Azure PowerShell