I have an existing Azure Virtual Network Gateway I'm attempting to reconfigure for use for BGP, per https://azure.microsoft.com/en-us/documentation/articles/vpn-gateway-bgp-resource-manager-ps/ .

However, I cannot find how to change the default ASN.

$gateway.BgpSettingsText currently shows:

  "Asn": 65515,
  "BgpPeeringAddress": "",
  "PeerWeight": 0

I see nothing exposed in the latest AzureRm Powershell that will allow me to change this.

Is there a way to change this? Or is the only solution to Remove-AzureRmVirtualNetworkGateway and start over?

  • 1
    Have you tried modifying it from Resource Explorer? resources.azure.com – Pedro Perez Jun 18 '16 at 21:33
  • I don't have an Azure subscription to test with but have you tried: converting the output to a psobject, updating the Asn property, converting back to JSON, and then updating $gateway.BgpSettingsText to the new JSON string? This will only work if the object definition will allow setting that property. – Persistent13 Mar 20 '17 at 21:37

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.