共用方式為


Update-AzP2sVpnGateway

在 VirtualHub 下更新現有的 P2SVpnGateway,以取得點對站連線能力。

語法

Update-AzP2sVpnGateway
      -ResourceGroupName <String>
      -Name <String>
      [-VpnClientAddressPool <String[]>]
      [-P2SConnectionConfiguration <PSP2SConnectionConfiguration[]>]
      [-VpnGatewayScaleUnit <UInt32>]
      [-CustomDnsServer <String[]>]
      [-RoutingConfiguration <PSRoutingConfiguration>]
      [-EnableInternetSecurityFlag]
      [-DisableInternetSecurityFlag]
      [-Tag <Hashtable>]
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzP2sVpnGateway
      -ResourceGroupName <String>
      -Name <String>
      [-VpnClientAddressPool <String[]>]
      [-P2SConnectionConfiguration <PSP2SConnectionConfiguration[]>]
      [-VpnServerConfiguration <PSVpnServerConfiguration>]
      [-VpnGatewayScaleUnit <UInt32>]
      [-CustomDnsServer <String[]>]
      [-RoutingConfiguration <PSRoutingConfiguration>]
      [-EnableInternetSecurityFlag]
      [-DisableInternetSecurityFlag]
      [-Tag <Hashtable>]
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzP2sVpnGateway
      -ResourceGroupName <String>
      -Name <String>
      [-VpnClientAddressPool <String[]>]
      [-P2SConnectionConfiguration <PSP2SConnectionConfiguration[]>]
      -VpnServerConfigurationId <String>
      [-VpnGatewayScaleUnit <UInt32>]
      [-CustomDnsServer <String[]>]
      [-RoutingConfiguration <PSRoutingConfiguration>]
      [-EnableInternetSecurityFlag]
      [-DisableInternetSecurityFlag]
      [-Tag <Hashtable>]
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzP2sVpnGateway
      -InputObject <PSP2SVpnGateway>
      [-VpnClientAddressPool <String[]>]
      [-P2SConnectionConfiguration <PSP2SConnectionConfiguration[]>]
      [-VpnGatewayScaleUnit <UInt32>]
      [-CustomDnsServer <String[]>]
      [-RoutingConfiguration <PSRoutingConfiguration>]
      [-EnableInternetSecurityFlag]
      [-DisableInternetSecurityFlag]
      [-Tag <Hashtable>]
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzP2sVpnGateway
      -InputObject <PSP2SVpnGateway>
      [-VpnClientAddressPool <String[]>]
      [-P2SConnectionConfiguration <PSP2SConnectionConfiguration[]>]
      [-VpnServerConfiguration <PSVpnServerConfiguration>]
      [-VpnGatewayScaleUnit <UInt32>]
      [-CustomDnsServer <String[]>]
      [-RoutingConfiguration <PSRoutingConfiguration>]
      [-EnableInternetSecurityFlag]
      [-DisableInternetSecurityFlag]
      [-Tag <Hashtable>]
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzP2sVpnGateway
      -InputObject <PSP2SVpnGateway>
      [-VpnClientAddressPool <String[]>]
      [-P2SConnectionConfiguration <PSP2SConnectionConfiguration[]>]
      -VpnServerConfigurationId <String>
      [-VpnGatewayScaleUnit <UInt32>]
      [-CustomDnsServer <String[]>]
      [-RoutingConfiguration <PSRoutingConfiguration>]
      [-EnableInternetSecurityFlag]
      [-DisableInternetSecurityFlag]
      [-Tag <Hashtable>]
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzP2sVpnGateway
      -ResourceId <String>
      [-VpnClientAddressPool <String[]>]
      [-P2SConnectionConfiguration <PSP2SConnectionConfiguration[]>]
      [-VpnGatewayScaleUnit <UInt32>]
      [-CustomDnsServer <String[]>]
      [-RoutingConfiguration <PSRoutingConfiguration>]
      [-EnableInternetSecurityFlag]
      [-DisableInternetSecurityFlag]
      [-Tag <Hashtable>]
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzP2sVpnGateway
      -ResourceId <String>
      [-VpnClientAddressPool <String[]>]
      [-P2SConnectionConfiguration <PSP2SConnectionConfiguration[]>]
      [-VpnServerConfiguration <PSVpnServerConfiguration>]
      [-VpnGatewayScaleUnit <UInt32>]
      [-CustomDnsServer <String[]>]
      [-RoutingConfiguration <PSRoutingConfiguration>]
      [-EnableInternetSecurityFlag]
      [-DisableInternetSecurityFlag]
      [-Tag <Hashtable>]
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzP2sVpnGateway
      -ResourceId <String>
      [-VpnClientAddressPool <String[]>]
      [-P2SConnectionConfiguration <PSP2SConnectionConfiguration[]>]
      -VpnServerConfigurationId <String>
      [-VpnGatewayScaleUnit <UInt32>]
      [-CustomDnsServer <String[]>]
      [-RoutingConfiguration <PSRoutingConfiguration>]
      [-EnableInternetSecurityFlag]
      [-DisableInternetSecurityFlag]
      [-Tag <Hashtable>]
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Update-AzP2sVpnGateway Cmdlet 可讓您使用新的 VpnClientAddressPool 或新的 VpnServerConfiguration 或變更 VpnGatewayScaleUnit,在 VirtualHub 下更新現有的 P2SVpnGatewayGateway。

範例

範例 1

$vpnClientAddressSpaces = New-Object string[] 1 
$vpnClientAddressSpaces[0] = "101.10.0.0/16"
Update-AzP2sVpnGateway -ResourceGroupName P2SCortexGATesting -Name 683482ade8564515aed4b8448c9757ea-westus-gw -VpnClientAddressPool $vpnClientAddressSpaces -EnableInternetSecurityFlag

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/NilamdWestUsVirtualH
                                 ub
VpnServerConfiguration         : /subscriptions/b1f1deed-af60-4bab-9223-65d340462e24/resourceGroups/P2SCortexGATesting/providers/Microsoft.Network/vpnServerConfigurations/NilamdWe
                                 stUsConfig
VpnServerConfigurationLocation :
VpnClientConnectionHealth      : null
Type                           : Microsoft.Network/p2sVpnGateways
ProvisioningState              : Succeeded
P2SConnectionConfigurations    : [
                                   {
                                     "ProvisioningState": "Succeeded",
                                     "VpnClientAddressPool": {
                                       "AddressPrefixes": [
                                         "101.10.0.0/16"
                                       ]
                                     },
                                     "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/\"d7debc2f-ccbb-4f00-bddc-42c99b52fda3\"",
                                     "Id": "/subscriptions/b1f1deed-af60-4bab-9223-65d340462e24/resourceGroups/P2SCortexGATesting/providers/Microsoft.Network/p2sVpnGateways/683482
                                 ade8564515aed4b8448c9757ea-westus-gw/p2sConnectionConfigurations/P2SConnectionConfigDefault"
                                   }
                                 ]

Update-AzP2sVpnGateway Cmdlet 可讓您使用新的 VpnClientAddressPool,在 VirtualHub 下更新現有的 P2SVpnGateway。 當點對站用戶端使用此 P2SVpnGateway 連線時,此 VpnClientAddressPool 的其中一個 IP 位址會配置給該用戶端。

範例 2

在 VirtualHub 下更新現有的 P2SVpnGateway,以取得點對站連線能力。 ( 自動產生 )

Update-AzP2sVpnGateway -AsJob -Name 00000000-0000-0000-0000-00000000000000000-westus-gw -ResourceGroupName P2SCortexGATesting -VpnClientAddressPool <String[]> -VpnGatewayScaleUnit 1 -VpnServerConfiguration <PSVpnServerConfiguration>

參數

-AsJob

在背景執行 Cmdlet

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Confirm

執行 Cmdlet 之前先提示您確認。

類型:SwitchParameter
別名:cf
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-CustomDnsServer

自訂 Dns 伺服器的清單。

類型:String[]
Position:Named
預設值:None
必要:False
接受管線輸入:True
接受萬用字元:False

-DefaultProfile

用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。

類型:IAzureContextContainer
別名:AzContext, AzureRmContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-DisableInternetSecurityFlag

停用此 P2SVpnGateway 連線的因特網安全性旗標

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-EnableInternetSecurityFlag

啟用此 P2SVpnGateway 連線的因特網安全性旗標

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-InputObject

要修改的 p2s vpn 閘道物件

類型:PSP2SVpnGateway
別名:P2SVpnGateway
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-Name

P2S vpn 閘道名稱。

類型:String
別名:ResourceName, P2SVpnGatewayName, GatewayName
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-P2SConnectionConfiguration

此 P2SVpnGateway 必須具備的 P2SConnectionConfigurations 清單。

類型:PSP2SConnectionConfiguration[]
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-ResourceGroupName

資源組名。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-ResourceId

要修改之 P2SVpnGateway 的 Azure 資源識別符。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-RoutingConfiguration

此連線的路由設定

類型:PSRoutingConfiguration
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Tag

表示資源標記的哈希表。

類型:Hashtable
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-VpnClientAddressPool

此 P2SVpnGateway P2SConnectionConfiguration 的 P2S VpnClient AddressPool。

類型:String[]
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-VpnGatewayScaleUnit

此 P2SVpnGateway 的縮放單位。

類型:UInt32
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-VpnServerConfiguration

要附加至此 P2SVpnGateway 的 VpnServerConfiguration。

類型:PSVpnServerConfiguration
Position:Named
預設值:None
必要:False
接受管線輸入:True
接受萬用字元:False

-VpnServerConfigurationId

此 P2SVpnGateway 將會附加此 P2SVpnGateway 之 Vpn 伺服器組態物件的識別碼。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-WhatIf

顯示執行 Cmdlet 後會發生的情況。 未執行 Cmdlet。

類型:SwitchParameter
別名:wi
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

PSP2SVpnGateway

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

輸出

PSP2SVpnGateway