你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Update-AzVpnServerConfigurationPolicyGroup
在 VirtualHub 下创建新的 P2SVpnGateway,以建立点到站点连接。
语法
Update-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>]
Update-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>]
Update-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>]
Update-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>]
Update-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>]
Update-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>]
说明
使用 New-AzP2sVpnGateway cmdlet,可以在 VirtualHub 下创建新的 P2SVpnGateway,以便从点到站点客户端到 Azure VirtualWan 建立点到站点连接。
示例
示例 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"
}
]
使用 New-AzP2sVpnGateway cmdlet,可以在 VirtualHub 下为点到站点连接创建新的 P2SVpnGateway。
参数
-AsJob
在后台运行 cmdlet
类型: | SwitchParameter |
Position: | Named |
默认值: | False |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Confirm
提示你在运行 cmdlet 之前进行确认。
类型: | SwitchParameter |
别名: | cf |
Position: | Named |
默认值: | False |
必需: | 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 P2SConnectionConfiguration 上禁用 Internet 安全功能的标志。
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-EnableInternetSecurityFlag
为此 P2SVpnGateway 连接启用 Internet 安全标志
类型: | SwitchParameter |
Position: | Named |
默认值: | False |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-EnableRoutingPreferenceInternetFlag
用于在此 P2SVpnGateway 上启用路由首选项 Internet 的标志。
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Name
资源名称。
类型: | String |
别名: | ResourceName, P2SVpnGatewayName |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-P2SConnectionConfiguration
此 P2SVpnGateway 需要具有的 P2SConnectionConfigurations 列表。
类型: | PSP2SConnectionConfiguration[] |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-ResourceGroupName
资源名称。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-RoutingConfiguration
此连接的路由配置
类型: | PSRoutingConfiguration |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Tag
表示资源标记的哈希表。
类型: | Hashtable |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-VirtualHub
需要与此 P2SVpnGateway 关联的 VirtualHub。
类型: | PSVirtualHub |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-VirtualHubId
此 P2SVpnGateway 需要与 VirtualHub 的 ID 相关联。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-VirtualHubName
此 P2SVpnGateway 需要与 VirtualHub 的 ID 相关联。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-VpnClientAddressPool
此 P2SVpnGateway P2SConnectionConfiguration 的 P2S VpnClient AddressPool。
类型: | String[] |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-VpnGatewayScaleUnit
此 P2SVpnGateway 的缩放单元。
类型: | UInt32 |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | 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 |
默认值: | False |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
输入
System.String Microsoft.Azure.Commands.Network.Models.PSVpnServerConfiguration