Dela via


Get-AzVpnServerConfigurationPolicyGroup

Skapa en ny P2SVpnGateway under VirtualHub för punkt-till-plats-anslutning.

Syntax

Get-AzVpnServerConfigurationPolicyGroup
   -ResourceGroupName <String>
   -Name <String>
   -VpnGatewayScaleUnit <UInt32>
   -VirtualHubName <String>
   [-VpnServerConfiguration <PSVpnServerConfiguration>]
   [-VpnClientAddressPool <String[]>]
   [-CustomDnsServer <String[]>]
   [-RoutingConfiguration <PSRoutingConfiguration>]
   [-EnableInternetSecurityFlag]
   [-DisableInternetSecurityFlag]
   [-EnableRoutingPreferenceInternetFlag]
   [-P2SConnectionConfiguration <PSP2SConnectionConfiguration[]>]
   [-Tag <Hashtable>]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Get-AzVpnServerConfigurationPolicyGroup
   -ResourceGroupName <String>
   -Name <String>
   -VpnGatewayScaleUnit <UInt32>
   -VirtualHubName <String>
   -VpnServerConfigurationId <String>
   [-VpnClientAddressPool <String[]>]
   [-CustomDnsServer <String[]>]
   [-RoutingConfiguration <PSRoutingConfiguration>]
   [-EnableInternetSecurityFlag]
   [-DisableInternetSecurityFlag]
   [-EnableRoutingPreferenceInternetFlag]
   [-P2SConnectionConfiguration <PSP2SConnectionConfiguration[]>]
   [-Tag <Hashtable>]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Get-AzVpnServerConfigurationPolicyGroup
   -ResourceGroupName <String>
   -Name <String>
   -VpnGatewayScaleUnit <UInt32>
   -VirtualHub <PSVirtualHub>
   [-VpnServerConfiguration <PSVpnServerConfiguration>]
   [-VpnClientAddressPool <String[]>]
   [-CustomDnsServer <String[]>]
   [-RoutingConfiguration <PSRoutingConfiguration>]
   [-EnableInternetSecurityFlag]
   [-DisableInternetSecurityFlag]
   [-EnableRoutingPreferenceInternetFlag]
   [-P2SConnectionConfiguration <PSP2SConnectionConfiguration[]>]
   [-Tag <Hashtable>]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Get-AzVpnServerConfigurationPolicyGroup
   -ResourceGroupName <String>
   -Name <String>
   -VpnGatewayScaleUnit <UInt32>
   -VirtualHub <PSVirtualHub>
   -VpnServerConfigurationId <String>
   [-VpnClientAddressPool <String[]>]
   [-CustomDnsServer <String[]>]
   [-RoutingConfiguration <PSRoutingConfiguration>]
   [-EnableInternetSecurityFlag]
   [-DisableInternetSecurityFlag]
   [-EnableRoutingPreferenceInternetFlag]
   [-P2SConnectionConfiguration <PSP2SConnectionConfiguration[]>]
   [-Tag <Hashtable>]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Get-AzVpnServerConfigurationPolicyGroup
   -ResourceGroupName <String>
   -Name <String>
   -VpnGatewayScaleUnit <UInt32>
   -VirtualHubId <String>
   [-VpnServerConfiguration <PSVpnServerConfiguration>]
   [-VpnClientAddressPool <String[]>]
   [-CustomDnsServer <String[]>]
   [-RoutingConfiguration <PSRoutingConfiguration>]
   [-EnableInternetSecurityFlag]
   [-DisableInternetSecurityFlag]
   [-EnableRoutingPreferenceInternetFlag]
   [-P2SConnectionConfiguration <PSP2SConnectionConfiguration[]>]
   [-Tag <Hashtable>]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Get-AzVpnServerConfigurationPolicyGroup
   -ResourceGroupName <String>
   -Name <String>
   -VpnGatewayScaleUnit <UInt32>
   -VirtualHubId <String>
   -VpnServerConfigurationId <String>
   [-VpnClientAddressPool <String[]>]
   [-CustomDnsServer <String[]>]
   [-RoutingConfiguration <PSRoutingConfiguration>]
   [-EnableInternetSecurityFlag]
   [-DisableInternetSecurityFlag]
   [-EnableRoutingPreferenceInternetFlag]
   [-P2SConnectionConfiguration <PSP2SConnectionConfiguration[]>]
   [-Tag <Hashtable>]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Med cmdleten New-AzP2sVpnGateway kan du skapa en ny P2SVpnGateway under VirtualHub för punkt-till-plats-anslutning från punkt till plats-klienter till Azure VirtualWan.

Exempel

Exempel 1

$virtualHub = Get-AzVirtualHub -ResourceGroupName P2SCortexGATesting -Name WestUsVirtualHub
$vpnServerConfig1 = Get-AzVpnServerConfiguration -ResourceGroupName P2SCortexGATesting -Name WestUsConfig
$vpnClientAddressSpaces = New-Object string[] 1
$vpnClientAddressSpaces[0] = "192.168.2.0/24"
$createdP2SVpnGateway = New-AzP2sVpnGateway -ResourceGroupName P2SCortexGATesting -Name 683482ade8564515aed4b8448c9757ea-westus-gw -VirtualHub $virtualHub -VpnGatewayScaleUnit 1 -VpnClientAddressPool $vpnClientAddressSpaces -VpnServerConfiguration $vpnServerConfig1 -EnableInternetSecurityFlag -EnableRoutingPreferenceInternetFlag

ResourceGroupName              : P2SCortexGATesting
Name                           : 683482ade8564515aed4b8448c9757ea-westus-gw
Id                             : /subscriptions/b1f1deed-af60-4bab-9223-65d340462e24/resourceGroups/P2SCortexGATesting/providers/Microsoft.Network/p2sVpnGateways/683482ade8564515a
                                 ed4b8448c9757ea-westus-gw
Location                       : westus
VpnGatewayScaleUnit            : 1
VirtualHub                     : /subscriptions/b1f1deed-af60-4bab-9223-65d340462e24/resourceGroups/P2SCortexGATesting/providers/Microsoft.Network/virtualHubs/WestUsVirtualHub
VpnServerConfiguration         : /subscriptions/b1f1deed-af60-4bab-9223-65d340462e24/resourceGroups/P2SCortexGATesting/providers/Microsoft.Network/vpnServerConfigurations/WestUsConfig
VpnServerConfigurationLocation :
VpnClientConnectionHealth      : null
Type                           : Microsoft.Network/p2sVpnGateways
ProvisioningState              : Succeeded
P2SConnectionConfigurations    : [
                                   {
                                     "ProvisioningState": "Succeeded",
                                     "VpnClientAddressPool": {
                                       "AddressPrefixes": [
                                         "192.168.2.0/24"
                                       ]
                                     },
                                     "EnableInternetSecurity": True,
                                     "RoutingConfiguration": {
                                       "AssociatedRouteTable": {
                                         "Id": "/subscriptions/b1f1deed-af60-4bab-9223-65d340462e24/resourceGroups/P2SCortexGATesting/providers/Microsoft.Network/virtualHubs/WestUsVirtualHub/hubRouteTables/defaultRouteTable"
                                       }
                                       "PropagatedRouteTables": {
                                         "Labels": [],
                                         "Ids": [
                                           {
                                            "Id": "/subscriptions/b1f1deed-af60-4bab-9223-65d340462e24/resourceGroups/P2SCortexGATesting/providers/Microsoft.Network/virtualHubs/WestUsVirtualHub/hubRouteTables/defaultRouteTable"
                                           }
                                        ]
                                       },
                                       "VnetRoutes": {
                                         "StaticRoutes": []
                                       }
                                     },
                                     "Name": "P2SConnectionConfigDefault",
                                     "Etag": "W/\"4b96e6a2-b4d8-46b3-9210-76d40f359bef\"",
                                     "Id": "/subscriptions/b1f1deed-af60-4bab-9223-65d340462e24/resourceGroups/P2SCortexGATesting/providers/Microsoft.Network/p2sVpnGateways/683482
                                 ade8564515aed4b8448c9757ea-westus-gw/p2sConnectionConfigurations/P2SConnectionConfigDefault"
                                   }
                                 ]

Med cmdleten New-AzP2sVpnGateway kan du skapa en ny P2SVpnGateway under VirtualHub för punkt-till-plats-anslutning.

Parametrar

-AsJob

Kör cmdlet i bakgrunden

Typ:SwitchParameter
Position:Named
Standardvärde:False
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-Confirm

Uppmanar dig att bekräfta innan du kör cmdleten.

Typ:SwitchParameter
Alias:cf
Position:Named
Standardvärde:False
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-CustomDnsServer

Listan över anpassade DNS-servrar.

Typ:String[]
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:True
Godkänn jokertecken:False

-DefaultProfile

Autentiseringsuppgifter, konto, klientorganisation och prenumeration som används för kommunikation med Azure.

Typ:IAzureContextContainer
Alias:AzContext, AzureRmContext, AzureCredential
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-DisableInternetSecurityFlag

Flagga för att inaktivera internetsäkerhetsfunktionen i den här P2SVpnGateway P2SConnectionConfiguration.

Typ:SwitchParameter
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-EnableInternetSecurityFlag

Aktivera internetsäkerhetsflagga för dessa P2SVpnGateway-anslutningar

Typ:SwitchParameter
Position:Named
Standardvärde:False
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-EnableRoutingPreferenceInternetFlag

Flagga för att aktivera Internet för routningsinställningar på den här P2SVpnGateway.

Typ:SwitchParameter
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-Name

Resursnamnet.

Typ:String
Alias:ResourceName, P2SVpnGatewayName
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-P2SConnectionConfiguration

Listan över P2SConnectionConfigurations som denna P2SVpnGateway måste ha.

Typ:PSP2SConnectionConfiguration[]
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-ResourceGroupName

Resursnamnet.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-RoutingConfiguration

Routningskonfiguration för den här anslutningen

Typ:PSRoutingConfiguration
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-Tag

En hashtable som representerar resurstaggar.

Typ:Hashtable
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-VirtualHub

VirtualHub denna P2SVpnGateway måste associeras med.

Typ:PSVirtualHub
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:True
Godkänn jokertecken:False

-VirtualHubId

ID:t för VirtualHub denna P2SVpnGateway måste associeras med.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:True
Godkänn jokertecken:False

-VirtualHubName

ID:t för VirtualHub denna P2SVpnGateway måste associeras med.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-VpnClientAddressPool

P2S VpnClient AddressPool för denna P2SVpnGateway P2SConnectionConfiguration.

Typ:String[]
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-VpnGatewayScaleUnit

Skalningsenheten för denna P2SVpnGateway.

Typ:UInt32
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-VpnServerConfiguration

VpnServerConfiguration som ska kopplas till denna P2SVpnGateway.

Typ:PSVpnServerConfiguration
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:True
Godkänn jokertecken:False

-VpnServerConfigurationId

ID:t för vpn-serverkonfigurationsobjektet som P2SVpnGateway kopplas till.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:True
Godkänn jokertecken:False

-WhatIf

Visar vad som skulle hända om cmdleten kördes. Cmdleten körs inte.

Typ:SwitchParameter
Alias:wi
Position:Named
Standardvärde:False
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

Indata

PSVirtualHub

System.String Microsoft.Azure.Commands.Network.Models.PSVpnServerConfiguration

Utdata

PSP2SVpnGateway