Update-AzVpnSite
Syntax
ByVpnSiteNameNoVirtualWanUpdate (Default)
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>]
ByVpnSiteNameByVirtualWanName
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>]
ByVpnSiteNameByVirtualWanResourceId
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>]
ByVpnSiteNameByVirtualWanObject
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>]
ByVpnSiteObjectByVirtualWanName
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>]
ByVpnSiteObjectByVirtualWanResourceId
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>]
ByVpnSiteObjectByVirtualWanObject
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>]
ByVpnSiteObjectNoVirtualWanUpdate
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>]
ByVpnSiteResourceIdByVirtualWanName
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>]
ByVpnSiteResourceIdByVirtualWanResourceId
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>]
ByVpnSiteResourceIdByVirtualWanObject
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>]
ByVpnSiteResourceIdNoVirtualWanUpdate
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
The Update-AzVpnSite cmdlet updates a VPN site.
Examples
Example 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
The above will create a resource group, Virtual WAN in West US in "testRG" resource group in Azure.
Then it creates a VpnSite to represent a customer branch and links it to the Virtual WAN.
Once the site is created, it updates the IpAddress of the site using the Set-AzVpnSite command.
Parameters
-AddressSpace
The address prefixes of the virtual network.
Use this or AddressSpaceObject but not both.
Parameter properties
Type: String [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-AsJob
Run cmdlet in the background
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-BgpAsn
The BGP ASN for this VpnSite.
Parameter properties
Type: UInt32
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-BgpPeeringAddress
The BGP Peering Address for this VpnSite.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-BgpPeeringWeight
The BGP Peering weight for this VpnSite.
Parameter properties
Type: UInt32
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DeviceModel
The device model of the remote vpn device.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DeviceVendor
The device vendor of the remote vpn device.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
The vpn site object to be modified
Type: PSVpnSite
Default value: None
Supports wildcards: False
DontShow: False
Aliases: VpnSite
ByVpnSiteObjectByVirtualWanName
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
ByVpnSiteObjectByVirtualWanResourceId
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
ByVpnSiteObjectByVirtualWanObject
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
ByVpnSiteObjectNoVirtualWanUpdate
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-IpAddress
IP address of local network gateway.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-LinkSpeedInMbps
The device model of the remote vpn device.
Parameter properties
Type: UInt32
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
The resource name.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: ResourceName, VpnSiteName
Parameter sets
ByVpnSiteNameNoVirtualWanUpdate
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ByVpnSiteNameByVirtualWanName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ByVpnSiteNameByVirtualWanResourceId
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ByVpnSiteNameByVirtualWanObject
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-O365Policy
The office 365 traffic breakout policy for this VpnSite.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
The resource group name.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByVpnSiteNameNoVirtualWanUpdate
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ByVpnSiteNameByVirtualWanName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ByVpnSiteNameByVirtualWanResourceId
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ByVpnSiteNameByVirtualWanObject
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceId
The Azure resource ID for the vpn site.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: VpnSiteId
Parameter sets
ByVpnSiteResourceIdByVirtualWanName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
ByVpnSiteResourceIdByVirtualWanResourceId
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
ByVpnSiteResourceIdByVirtualWanObject
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
ByVpnSiteResourceIdNoVirtualWanUpdate
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Tag
A hashtable which represents resource tags.
Parameter properties
Type: Hashtable
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-VirtualWan
The VirtualWan this VpnSite needs to be connected to.
Parameter properties
Type: PSVirtualWan
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByVpnSiteNameByVirtualWanObject
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ByVpnSiteObjectByVirtualWanObject
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ByVpnSiteResourceIdByVirtualWanObject
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-VirtualWanId
The ResourceId VirtualWan this VpnSite needs to be connected to.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByVpnSiteNameByVirtualWanResourceId
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ByVpnSiteObjectByVirtualWanResourceId
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ByVpnSiteResourceIdByVirtualWanResourceId
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-VirtualWanName
The name of the VirtualWan this VpnSite needs to be connected to.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByVpnSiteNameByVirtualWanName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ByVpnSiteObjectByVirtualWanName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ByVpnSiteResourceIdByVirtualWanName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-VirtualWanResourceGroupName
The resource group name of the VirtualWan this VpnSite needs to be connected to.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByVpnSiteNameByVirtualWanName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ByVpnSiteObjectByVirtualWanName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ByVpnSiteResourceIdByVirtualWanName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-VpnSiteLink
The list of VpnSiteLinks that this VpnSite have.
Parameter properties
Type: PSVpnSiteLink [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs