Update-AzureRmVpnSite

Updates a VpnSite representing a customer branch to an intended goal state.

Warning

The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.

Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.

Syntax

Update-AzureRmVpnSite
      -ResourceGroupName <String>
      -Name <String>
      [-IpAddress <String>]
      [-AddressSpace <System.Collections.Generic.List`1[System.String]>]
      [-DeviceModel <String>]
      [-DeviceVendor <String>]
      [-LinkSpeedInMbps <UInt32>]
      [-BgpAsn <UInt32>]
      [-BgpPeeringAddress <String>]
      [-BgpPeeringWeight <UInt32>]
      [-Tag <Hashtable>]
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzureRmVpnSite
      -ResourceGroupName <String>
      -Name <String>
      -VirtualWanResourceGroupName <String>
      -VirtualWanName <String>
      [-IpAddress <String>]
      [-AddressSpace <System.Collections.Generic.List`1[System.String]>]
      [-DeviceModel <String>]
      [-DeviceVendor <String>]
      [-LinkSpeedInMbps <UInt32>]
      [-BgpAsn <UInt32>]
      [-BgpPeeringAddress <String>]
      [-BgpPeeringWeight <UInt32>]
      [-Tag <Hashtable>]
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzureRmVpnSite
      -ResourceGroupName <String>
      -Name <String>
      -VirtualWanId <String>
      [-IpAddress <String>]
      [-AddressSpace <System.Collections.Generic.List`1[System.String]>]
      [-DeviceModel <String>]
      [-DeviceVendor <String>]
      [-LinkSpeedInMbps <UInt32>]
      [-BgpAsn <UInt32>]
      [-BgpPeeringAddress <String>]
      [-BgpPeeringWeight <UInt32>]
      [-Tag <Hashtable>]
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzureRmVpnSite
      -ResourceGroupName <String>
      -Name <String>
      -VirtualWan <PSVirtualWan>
      [-IpAddress <String>]
      [-AddressSpace <System.Collections.Generic.List`1[System.String]>]
      [-DeviceModel <String>]
      [-DeviceVendor <String>]
      [-LinkSpeedInMbps <UInt32>]
      [-BgpAsn <UInt32>]
      [-BgpPeeringAddress <String>]
      [-BgpPeeringWeight <UInt32>]
      [-Tag <Hashtable>]
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzureRmVpnSite
      -InputObject <PSVpnSite>
      -VirtualWanResourceGroupName <String>
      -VirtualWanName <String>
      [-IpAddress <String>]
      [-AddressSpace <System.Collections.Generic.List`1[System.String]>]
      [-DeviceModel <String>]
      [-DeviceVendor <String>]
      [-LinkSpeedInMbps <UInt32>]
      [-BgpAsn <UInt32>]
      [-BgpPeeringAddress <String>]
      [-BgpPeeringWeight <UInt32>]
      [-Tag <Hashtable>]
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzureRmVpnSite
      -InputObject <PSVpnSite>
      -VirtualWanId <String>
      [-IpAddress <String>]
      [-AddressSpace <System.Collections.Generic.List`1[System.String]>]
      [-DeviceModel <String>]
      [-DeviceVendor <String>]
      [-LinkSpeedInMbps <UInt32>]
      [-BgpAsn <UInt32>]
      [-BgpPeeringAddress <String>]
      [-BgpPeeringWeight <UInt32>]
      [-Tag <Hashtable>]
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzureRmVpnSite
      -InputObject <PSVpnSite>
      -VirtualWan <PSVirtualWan>
      [-IpAddress <String>]
      [-AddressSpace <System.Collections.Generic.List`1[System.String]>]
      [-DeviceModel <String>]
      [-DeviceVendor <String>]
      [-LinkSpeedInMbps <UInt32>]
      [-BgpAsn <UInt32>]
      [-BgpPeeringAddress <String>]
      [-BgpPeeringWeight <UInt32>]
      [-Tag <Hashtable>]
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzureRmVpnSite
      -InputObject <PSVpnSite>
      [-IpAddress <String>]
      [-AddressSpace <System.Collections.Generic.List`1[System.String]>]
      [-DeviceModel <String>]
      [-DeviceVendor <String>]
      [-LinkSpeedInMbps <UInt32>]
      [-BgpAsn <UInt32>]
      [-BgpPeeringAddress <String>]
      [-BgpPeeringWeight <UInt32>]
      [-Tag <Hashtable>]
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzureRmVpnSite
      -ResourceId <String>
      -VirtualWanResourceGroupName <String>
      -VirtualWanName <String>
      [-IpAddress <String>]
      [-AddressSpace <System.Collections.Generic.List`1[System.String]>]
      [-DeviceModel <String>]
      [-DeviceVendor <String>]
      [-LinkSpeedInMbps <UInt32>]
      [-BgpAsn <UInt32>]
      [-BgpPeeringAddress <String>]
      [-BgpPeeringWeight <UInt32>]
      [-Tag <Hashtable>]
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzureRmVpnSite
      -ResourceId <String>
      -VirtualWanId <String>
      [-IpAddress <String>]
      [-AddressSpace <System.Collections.Generic.List`1[System.String]>]
      [-DeviceModel <String>]
      [-DeviceVendor <String>]
      [-LinkSpeedInMbps <UInt32>]
      [-BgpAsn <UInt32>]
      [-BgpPeeringAddress <String>]
      [-BgpPeeringWeight <UInt32>]
      [-Tag <Hashtable>]
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzureRmVpnSite
      -ResourceId <String>
      -VirtualWan <PSVirtualWan>
      [-IpAddress <String>]
      [-AddressSpace <System.Collections.Generic.List`1[System.String]>]
      [-DeviceModel <String>]
      [-DeviceVendor <String>]
      [-LinkSpeedInMbps <UInt32>]
      [-BgpAsn <UInt32>]
      [-BgpPeeringAddress <String>]
      [-BgpPeeringWeight <UInt32>]
      [-Tag <Hashtable>]
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzureRmVpnSite
      -ResourceId <String>
      [-IpAddress <String>]
      [-AddressSpace <System.Collections.Generic.List`1[System.String]>]
      [-DeviceModel <String>]
      [-DeviceVendor <String>]
      [-LinkSpeedInMbps <UInt32>]
      [-BgpAsn <UInt32>]
      [-BgpPeeringAddress <String>]
      [-BgpPeeringWeight <UInt32>]
      [-Tag <Hashtable>]
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Updates a VpnSite representing a customer branch to an intended goal state.

Examples

Example 1

PS C:\> New-AzureRmResourceGroup -Location "West US" -Name "testRG"
PS C:\> $virtualWan = New-AzureRmVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West US"
PS C:\> $vpnSiteAddressSpaces = New-Object string[] 2
PS C:\> $vpnSiteAddressSpaces[0] = "192.168.2.0/24"
PS C:\> $vpnSiteAddressSpaces[1] = "192.168.3.0/24"
PS C:\> New-AzureRmVpnSite -ResourceGroupName "testRG" -Name "testVpnSite" -Location "West US" -VirtualWan $virtualWan -IpAddress "1.2.3.4" -AddressSpace $vpnSiteAddressSpaces -DeviceModel "SomeDevice" -DeviceVendor "SomeDeviceVendor" -LinkSpeedInMbps "10"
PS C:\> New-AzureRmVpnSite -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-AzureRmVpnSite command.

Parameters

-AddressSpace

The address prefixes of the virtual network. Use this or AddressSpaceObject but not both.

Type:List<T>[String]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-AsJob

Run cmdlet in the background

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-BgpAsn

The BGP ASN for this VpnSite.

Type:UInt32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-BgpPeeringAddress

The BGP Peering Address for this VpnSite.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-BgpPeeringWeight

The BGP Peering weight for this VpnSite.

Type:UInt32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DeviceModel

The device model of the remote vpn device.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DeviceVendor

The device vendor of the remote vpn device.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

The vpn site object to be modified

Type:PSVpnSite
Aliases:VpnSite
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-IpAddress

IP address of local network gateway.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-LinkSpeedInMbps

The device model of the remote vpn device.

Type:UInt32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

The resource name.

Type:String
Aliases:ResourceName, VpnSiteName
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

The resource group name.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceId

The Azure resource ID for the vpn site.

Type:String
Aliases:VpnSiteId
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Tag

A hashtable which represents resource tags.

Type:Hashtable
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-VirtualWan

The VirtualWan this VpnSite needs to be connected to.

Type:PSVirtualWan
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-VirtualWanId

The ResourceId VirtualWan this VpnSite needs to be connected to.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-VirtualWanName

The name of the VirtualWan this VpnSite needs to be connected to.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-VirtualWanResourceGroupName

The resource group name of the VirtualWan this VpnSite needs to be connected to.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

PSVpnSite

String

Outputs

PSVpnSite