你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Update-AzVpnSite
更新 VPN 站点。
语法
Update-AzVpnSite
-ResourceGroupName <String>
-Name <String>
[-IpAddress <String>]
[-AddressSpace <String[]>]
[-DeviceModel <String>]
[-DeviceVendor <String>]
[-LinkSpeedInMbps <UInt32>]
[-BgpAsn <UInt32>]
[-BgpPeeringAddress <String>]
[-BgpPeeringWeight <UInt32>]
[-VpnSiteLink <PSVpnSiteLink[]>]
[-O365Policy <PSO365PolicyProperties>]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzVpnSite
-ResourceGroupName <String>
-Name <String>
-VirtualWanResourceGroupName <String>
-VirtualWanName <String>
[-IpAddress <String>]
[-AddressSpace <String[]>]
[-DeviceModel <String>]
[-DeviceVendor <String>]
[-LinkSpeedInMbps <UInt32>]
[-BgpAsn <UInt32>]
[-BgpPeeringAddress <String>]
[-BgpPeeringWeight <UInt32>]
[-VpnSiteLink <PSVpnSiteLink[]>]
[-O365Policy <PSO365PolicyProperties>]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzVpnSite
-ResourceGroupName <String>
-Name <String>
-VirtualWanId <String>
[-IpAddress <String>]
[-AddressSpace <String[]>]
[-DeviceModel <String>]
[-DeviceVendor <String>]
[-LinkSpeedInMbps <UInt32>]
[-BgpAsn <UInt32>]
[-BgpPeeringAddress <String>]
[-BgpPeeringWeight <UInt32>]
[-VpnSiteLink <PSVpnSiteLink[]>]
[-O365Policy <PSO365PolicyProperties>]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzVpnSite
-ResourceGroupName <String>
-Name <String>
-VirtualWan <PSVirtualWan>
[-IpAddress <String>]
[-AddressSpace <String[]>]
[-DeviceModel <String>]
[-DeviceVendor <String>]
[-LinkSpeedInMbps <UInt32>]
[-BgpAsn <UInt32>]
[-BgpPeeringAddress <String>]
[-BgpPeeringWeight <UInt32>]
[-VpnSiteLink <PSVpnSiteLink[]>]
[-O365Policy <PSO365PolicyProperties>]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzVpnSite
-InputObject <PSVpnSite>
-VirtualWanResourceGroupName <String>
-VirtualWanName <String>
[-IpAddress <String>]
[-AddressSpace <String[]>]
[-DeviceModel <String>]
[-DeviceVendor <String>]
[-LinkSpeedInMbps <UInt32>]
[-BgpAsn <UInt32>]
[-BgpPeeringAddress <String>]
[-BgpPeeringWeight <UInt32>]
[-VpnSiteLink <PSVpnSiteLink[]>]
[-O365Policy <PSO365PolicyProperties>]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzVpnSite
-InputObject <PSVpnSite>
-VirtualWanId <String>
[-IpAddress <String>]
[-AddressSpace <String[]>]
[-DeviceModel <String>]
[-DeviceVendor <String>]
[-LinkSpeedInMbps <UInt32>]
[-BgpAsn <UInt32>]
[-BgpPeeringAddress <String>]
[-BgpPeeringWeight <UInt32>]
[-VpnSiteLink <PSVpnSiteLink[]>]
[-O365Policy <PSO365PolicyProperties>]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzVpnSite
-InputObject <PSVpnSite>
-VirtualWan <PSVirtualWan>
[-IpAddress <String>]
[-AddressSpace <String[]>]
[-DeviceModel <String>]
[-DeviceVendor <String>]
[-LinkSpeedInMbps <UInt32>]
[-BgpAsn <UInt32>]
[-BgpPeeringAddress <String>]
[-BgpPeeringWeight <UInt32>]
[-VpnSiteLink <PSVpnSiteLink[]>]
[-O365Policy <PSO365PolicyProperties>]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzVpnSite
-InputObject <PSVpnSite>
[-IpAddress <String>]
[-AddressSpace <String[]>]
[-DeviceModel <String>]
[-DeviceVendor <String>]
[-LinkSpeedInMbps <UInt32>]
[-BgpAsn <UInt32>]
[-BgpPeeringAddress <String>]
[-BgpPeeringWeight <UInt32>]
[-VpnSiteLink <PSVpnSiteLink[]>]
[-O365Policy <PSO365PolicyProperties>]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzVpnSite
-ResourceId <String>
-VirtualWanResourceGroupName <String>
-VirtualWanName <String>
[-IpAddress <String>]
[-AddressSpace <String[]>]
[-DeviceModel <String>]
[-DeviceVendor <String>]
[-LinkSpeedInMbps <UInt32>]
[-BgpAsn <UInt32>]
[-BgpPeeringAddress <String>]
[-BgpPeeringWeight <UInt32>]
[-VpnSiteLink <PSVpnSiteLink[]>]
[-O365Policy <PSO365PolicyProperties>]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzVpnSite
-ResourceId <String>
-VirtualWanId <String>
[-IpAddress <String>]
[-AddressSpace <String[]>]
[-DeviceModel <String>]
[-DeviceVendor <String>]
[-LinkSpeedInMbps <UInt32>]
[-BgpAsn <UInt32>]
[-BgpPeeringAddress <String>]
[-BgpPeeringWeight <UInt32>]
[-VpnSiteLink <PSVpnSiteLink[]>]
[-O365Policy <PSO365PolicyProperties>]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzVpnSite
-ResourceId <String>
-VirtualWan <PSVirtualWan>
[-IpAddress <String>]
[-AddressSpace <String[]>]
[-DeviceModel <String>]
[-DeviceVendor <String>]
[-LinkSpeedInMbps <UInt32>]
[-BgpAsn <UInt32>]
[-BgpPeeringAddress <String>]
[-BgpPeeringWeight <UInt32>]
[-VpnSiteLink <PSVpnSiteLink[]>]
[-O365Policy <PSO365PolicyProperties>]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzVpnSite
-ResourceId <String>
[-IpAddress <String>]
[-AddressSpace <String[]>]
[-DeviceModel <String>]
[-DeviceVendor <String>]
[-LinkSpeedInMbps <UInt32>]
[-BgpAsn <UInt32>]
[-BgpPeeringAddress <String>]
[-BgpPeeringWeight <UInt32>]
[-VpnSiteLink <PSVpnSiteLink[]>]
[-O365Policy <PSO365PolicyProperties>]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
Update-AzVpnSite cmdlet 更新 VPN 站点。
示例
示例 1
New-AzResourceGroup -Location "West US" -Name "testRG"
$virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West US"
$vpnSiteAddressSpaces = New-Object string[] 2
$vpnSiteAddressSpaces[0] = "192.168.2.0/24"
$vpnSiteAddressSpaces[1] = "192.168.3.0/24"
New-AzVpnSite -ResourceGroupName "testRG" -Name "testVpnSite" -Location "West US" -VirtualWan $virtualWan -IpAddress "1.2.3.4" -AddressSpace $vpnSiteAddressSpaces -DeviceModel "SomeDevice" -DeviceVendor "SomeDeviceVendor" -LinkSpeedInMbps "10"
New-AzVpnSite -ResourceGroupName "testRG" -Name "testVpnSite" -Location "West US" -VirtualWan $virtualWan -IpAddress "2.3.5.5"
ResourceGroupName : testRG
Name : testVpnSite
Id : /subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/vpnSites/testVpnSite
Location : eastus2euap
IpAddress : 2.3.4.5
VirtualWan : /subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/virtualWans/myVirtualWAN
AddressSpace : {192.168.2.0/24, 192.168.3.0/24}
BgpSettings :
Type : Microsoft.Network/vpnSites
ProvisioningState : Succeeded
上述操作将在 Azure 中的“testRG”资源组中创建一个资源组,虚拟 WAN美国西部。
然后,它会创建一个 VpnSite 来表示客户分支并将其链接到虚拟 WAN。
创建站点后,它将使用 Set-AzVpnSite 命令更新站点的 IpAddress。
参数
-AddressSpace
虚拟网络的地址前缀。 使用此或 AddressSpaceObject,但不能同时使用这两者。
类型: | String[] |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-AsJob
在后台运行 cmdlet
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-BgpAsn
此 VpnSite 的 BGP ASN。
类型: | UInt32 |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-BgpPeeringAddress
此 VpnSite 的 BGP 对等互连地址。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-BgpPeeringWeight
此 VpnSite 的 BGP 对等互连权重。
类型: | UInt32 |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Confirm
提示你在运行 cmdlet 之前进行确认。
类型: | SwitchParameter |
别名: | cf |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
类型: | IAzureContextContainer |
别名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-DeviceModel
远程 VPN 设备的设备模型。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-DeviceVendor
远程 VPN 设备的设备供应商。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-InputObject
要修改的 vpn 站点对象
类型: | PSVpnSite |
别名: | VpnSite |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-IpAddress
本地网络网关的 IP 地址。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-LinkSpeedInMbps
远程 VPN 设备的设备模型。
类型: | UInt32 |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Name
资源名称。
类型: | String |
别名: | ResourceName, VpnSiteName |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-O365Policy
此 VpnSite 的 Office 365 流量中断策略。
类型: | PSO365PolicyProperties |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-ResourceGroupName
资源组名称。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-ResourceId
VPN 站点的 Azure 资源 ID。
类型: | String |
别名: | VpnSiteId |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-Tag
表示资源标记的哈希表。
类型: | Hashtable |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-VirtualWan
此 VpnSite 需要连接到的 VirtualWan。
类型: | PSVirtualWan |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-VirtualWanId
此 VpnSite 需要连接到 ResourceId VirtualWan。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-VirtualWanName
此 VpnSite 需要连接到的 VirtualWan 的名称。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-VirtualWanResourceGroupName
此 VpnSite 需要连接到的 VirtualWan 的资源组名称。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-VpnSiteLink
此 VpnSite 具有的 VpnSiteLinks 列表。
类型: | PSVpnSiteLink[] |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-WhatIf
显示运行该 cmdlet 时会发生什么情况。 cmdlet 未运行。
类型: | SwitchParameter |
别名: | wi |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |