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>]
Description
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 資源識別碼。
類型: | 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 |