Skip to content

Latest commit

 

History

History
117 lines (77 loc) · 4.33 KB

File metadata and controls

117 lines (77 loc) · 4.33 KB
title Migrate to an availability zone-enabled ExpressRoute virtual network gateway using PowerShell
titleSuffix Azure ExpressRoute
description Learn how to migrate from Standard, HighPerformance, or UltraPerformance SKUs to availability zone-enabled SKUs (ErGw1Az, ErGw2Az, ErGw3Az) using PowerShell.
services expressroute
author duongau
ms.service azure-expressroute
ms.topic how-to
ms.date 11/06/2025
ms.author duau

Migrate to an availability zone-enabled ExpressRoute virtual network gateway using PowerShell

Important

ExpressRoute gateway migrations are temporarily paused. Don't initiate migrations at this time. You will be notified when migrations can resume.

This article shows you how to migrate an ExpressRoute virtual network gateway from Standard, HighPerformance, or UltraPerformance SKUs to availability zone-enabled SKUs (ErGw1Az, ErGw2Az, ErGw3Az) using PowerShell. Higher-level SKUs provide more CPUs and network bandwidth, resulting in higher network throughput and more dependable connections to your virtual network.

Prerequisites

Before you begin, make sure you have:

Working with Azure PowerShell

[!INCLUDE updated-for-az]

[!INCLUDE expressroute-cloudshell]

Migrate to a new gateway using PowerShell

The migration process uses PowerShell scripts to create a new gateway, transfer the configuration, and remove the old gateway.

Clone the migration scripts

  1. Clone the migration scripts from the Azure samples repository:

    git clone https://github.com/Azure-Samples/azure-docs-powershell-samples/ 
    
  2. Navigate to the ExpressRoute gateway migration directory:

    cd azure-docs-powershell-samples/expressroute-gateway/gateway-migration/
    

Prepare the migration

The PrepareMigration script creates a new ExpressRoute virtual network gateway on the same gateway subnet and connects it to your existing ExpressRoute circuits.

  1. Get the resource ID of your existing gateway:

    $resource = Get-AzResource -Name <gateway-name>
    $resource.Id
    

    Replace <gateway-name> with the name of your virtual network gateway.

  2. Run the PrepareMigration.ps1 script:

    .\PrepareMigration.ps1
    
  3. When prompted, enter the following information:

    • Resource ID of your gateway
    • Name suffix for your new resources (this name is appended to the existing name, for example: existingresourcename_newname)
    • Availability zone for your new gateway

Run the migration

The migration script transfers the configuration from the old gateway to the new gateway.

  1. Get the resource ID of your new gateway using the name you specified in the prepare step:

    $resource = Get-AzResource -Name <new-gateway-name>
    $resource.Id
    

    Replace <new-gateway-name> with the name of your new virtual network gateway.

  2. Run the Migration.ps1 script:

    .\Migration.ps1
    
  3. When prompted, enter the following information:

    • Resource ID of your original gateway
    • Resource ID of your new gateway

Commit the migration

The commit script removes the old gateway and its connections after you verify that the new gateway is working correctly.

Important

Before you run this step, verify that your new virtual network gateway has a working ExpressRoute connection. The migration process can cause a brief interruption of up to 3 minutes.

  1. Run the CommitMigration.ps1 script:

    .\CommitMigration.ps1
    
  2. When prompted, enter the resource ID of your original gateway.

Related content