你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
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>]
说明
通过 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,以建立点到站点连接。 (自动生成)
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 连接的 Internet 安全标志
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-EnableInternetSecurityFlag
为此 P2SVpnGateway 连接启用 Internet 安全标志
类型: | 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 资源 ID。
类型: | 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 将附加到的 Vpn 服务器配置对象的 ID。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-WhatIf
显示运行该 cmdlet 时会发生什么情况。 cmdlet 未运行。
类型: | SwitchParameter |
别名: | wi |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
输入
System.String Microsoft.Azure.Commands.Network.Models.PSVpnServerConfiguration