共用方式為


Update-AzP2sVpnGateway

更新 VirtualHub 下的現有 P2SVpnGateway,以進行點對站連線。

語法

ByP2SVpnGatewayNameNoVpnServerConfigurationUpdate (預設值)

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>]

ByP2SVpnGatewayNameByVpnServerConfigurationObject

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>]

ByP2SVpnGatewayNameByVpnServerConfigurationResourceId

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

ByP2SVpnGatewayObjectNoVpnServerConfigurationUpdate

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

ByP2SVpnGatewayObjectByVpnServerConfigurationObject

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>]

ByP2SVpnGatewayObjectByVpnServerConfigurationResourceId

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

ByP2SVpnGatewayResourceIdNoVpnServerConfigurationUpdate

Update-AzP2sVpnGateway
    -ResourceId <String>
    [-VpnClientAddressPool <String[]>]
    [-P2SConnectionConfiguration <PSP2SConnectionConfiguration[]>]
    [-VpnGatewayScaleUnit <UInt32>]
    [-CustomDnsServer <String[]>]
    [-RoutingConfiguration <PSRoutingConfiguration>]
    [-EnableInternetSecurityFlag]
    [-DisableInternetSecurityFlag]
    [-Tag <Hashtable>]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByP2SVpnGatewayResourceIdByVpnServerConfigurationObject

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>]

ByP2SVpnGatewayResourceIdByVpnServerConfigurationResourceId

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

Description

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

範例

範例 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,以進行點對站連線。 (autogenerated)

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

參數

-AsJob

在背景執行 Cmdlet

參數屬性

類型:SwitchParameter
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-Confirm

在執行 Cmdlet 之前,提示您進行確認。

參數屬性

類型:SwitchParameter
預設值:None
支援萬用字元:False
不要顯示:False
別名:參閱

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-CustomDnsServer

自訂 DNS 伺服器的清單。

參數屬性

類型:

String[]

預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-DefaultProfile

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

參數屬性

類型:IAzureContextContainer
預設值:None
支援萬用字元:False
不要顯示:False
別名:AzContext, AzureRmContext, AzureCredential

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-DisableInternetSecurityFlag

停用此 P2SVpnGateway 連線的網際網路安全性旗標

參數屬性

類型:SwitchParameter
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-EnableInternetSecurityFlag

為此 P2SVpnGateway 連線啟用網際網路安全旗標

參數屬性

類型:SwitchParameter
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-InputObject

要修改的 p2s vpn 閘道物件

參數屬性

類型:PSP2SVpnGateway
預設值:None
支援萬用字元:False
不要顯示:False
別名:P2SVpn閘道

參數集

ByP2SVpnGatewayObjectNoVpnServerConfigurationUpdate
Position:Named
必要:True
來自管線的值:True
來自管線按屬性名稱的值:False
來自剩餘引數的值:False
ByP2SVpnGatewayObjectByVpnServerConfigurationObject
Position:Named
必要:True
來自管線的值:True
來自管線按屬性名稱的值:False
來自剩餘引數的值:False
ByP2SVpnGatewayObjectByVpnServerConfigurationResourceId
Position:Named
必要:True
來自管線的值:True
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-Name

P2S vpn 閘道名稱。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False
別名:資源名稱, P2SVpn閘道名稱, 閘道名稱

參數集

ByP2SVpnGatewayNameNoVpnServerConfigurationUpdate
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False
ByP2SVpnGatewayNameByVpnServerConfigurationObject
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False
ByP2SVpnGatewayNameByVpnServerConfigurationResourceId
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-P2SConnectionConfiguration

此 P2SVpnGateway 需要具備的 P2SConnectionConfiguration 清單。

參數屬性

類型:

PSP2SConnectionConfiguration[]

預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-ResourceGroupName

資源組名。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

ByP2SVpnGatewayNameNoVpnServerConfigurationUpdate
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False
ByP2SVpnGatewayNameByVpnServerConfigurationObject
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False
ByP2SVpnGatewayNameByVpnServerConfigurationResourceId
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-ResourceId

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

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

ByP2SVpnGatewayResourceIdNoVpnServerConfigurationUpdate
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False
ByP2SVpnGatewayResourceIdByVpnServerConfigurationObject
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False
ByP2SVpnGatewayResourceIdByVpnServerConfigurationResourceId
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-RoutingConfiguration

此連線的路由配置

參數屬性

類型:PSRoutingConfiguration
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-Tag

代表資源標籤的雜湊表。

參數屬性

類型:Hashtable
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-VpnClientAddressPool

P2S VpnClient AddressPool。

參數屬性

類型:

String[]

預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-VpnGatewayScaleUnit

此 P2SVpnGateway 的縮放單位。

參數屬性

類型:UInt32
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-VpnServerConfiguration

要連線到此P2SVpnGateway的VpnServerConfiguration。

參數屬性

類型:PSVpnServerConfiguration
預設值:None
支援萬用字元:False
不要顯示:False

參數集

ByP2SVpnGatewayNameByVpnServerConfigurationObject
Position:Named
必要:False
來自管線的值:True
來自管線按屬性名稱的值:False
來自剩餘引數的值:False
ByP2SVpnGatewayObjectByVpnServerConfigurationObject
Position:Named
必要:False
來自管線的值:True
來自管線按屬性名稱的值:False
來自剩餘引數的值:False
ByP2SVpnGatewayResourceIdByVpnServerConfigurationObject
Position:Named
必要:False
來自管線的值:True
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-VpnServerConfigurationId

此 P2SVpnGateway 將附加至的 Vpn 伺服器組態物件的 ID。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

ByP2SVpnGatewayNameByVpnServerConfigurationResourceId
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False
ByP2SVpnGatewayObjectByVpnServerConfigurationResourceId
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False
ByP2SVpnGatewayResourceIdByVpnServerConfigurationResourceId
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-WhatIf

顯示 Cmdlet 執行時會發生什麼事。 指令未執行。

參數屬性

類型:SwitchParameter
預設值:None
支援萬用字元:False
不要顯示:False
別名:威斯康星州

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

CommonParameters

此 Cmdlet 支援常見參數:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 如需詳細資訊,請參閱 about_CommonParameters

輸入

PSP2SVpnGateway

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

輸出

PSP2SVpnGateway