Modify an ExpressRoute circuit using PowerShell (classic)

This article walks you through the steps to check the status, update, or delete and deprovision your ExpressRoute classic deployment model circuit. This article applies to the classic deployment model.

Important

As of March 1, 2017, you can't create new ExpressRoute circuits in the classic deployment model.

  • You can move an existing ExpressRoute circuit from the classic deployment model to the Resource Manager deployment model without experiencing any connectivity down time. For more information, see Move an existing circuit.
  • You can connect to virtual networks in the classic deployment model by setting allowClassicOperations to TRUE.

Use the following links to create and manage ExpressRoute circuits in the Resource Manager deployment model:

About Azure deployment models

Azure currently works with two deployment models: Resource Manager and classic. The two models are not completely compatible with each other. Before you begin, you need to know which model that you want to work in. For information about the deployment models, see Understanding deployment models. If you are new to Azure, we recommend that you use the Resource Manager deployment model.

Before you begin

Install the latest versions of the Azure Service Management (SM) PowerShell modules and the ExpressRoute module.

  1. Use the instructions in the Installing the Service Management module article to install the Azure Service Management Module. If you have the Az or RM module already installed, be sure to use '-AllowClobber'.

  2. Import the installed modules. When using the following example, adjust the path to reflect the location and version of your installed PowerShell modules.

    Import-Module 'C:\Program Files\WindowsPowerShell\Modules\Azure\5.3.0\Azure.psd1'
    Import-Module 'C:\Program Files\WindowsPowerShell\Modules\Azure\5.3.0\ExpressRoute\ExpressRoute.psd1'
    
  3. To sign in to your Azure account, open your PowerShell console with elevated rights and connect to your account. Use the following example to help you connect using the Service Management module:

    Add-AzureAccount
    

Get the status of a circuit

You can retrieve this information at any time by using the Get-AzureCircuit cmdlet. Making the call without any parameters lists all the circuits.

Get-AzureDedicatedCircuit

Bandwidth                        : 200
CircuitName                      : MyTestCircuit
Location                         : Beijing
ServiceKey                       : *********************************
ServiceProviderName              : Beijing Telecom Ethernet
ServiceProviderProvisioningState : Provisioned
Sku                              : Standard
Status                           : Enabled

You can get information on a specific ExpressRoute circuit by passing the service key as a parameter to the call.

Get-AzureDedicatedCircuit -ServiceKey "*********************************"

Bandwidth                        : 200
CircuitName                      : MyTestCircuit
Location                         : Beijing
ServiceKey                       : *********************************
ServiceProviderName              : Beijing Telecom Ethernet
ServiceProviderProvisioningState : Provisioned
Sku                              : Standard
Status                           : Enabled

You can get detailed descriptions of all the parameters by running the following example:

get-help get-azurededicatedcircuit -detailed

Modify a circuit

You can modify certain properties of an ExpressRoute circuit without impacting connectivity.

You can do the following tasks with no downtime:

  • Enable or disable an ExpressRoute premium add-on for your ExpressRoute circuit.
  • Increase the bandwidth of your ExpressRoute circuit provided there is capacity available on the port. Downgrading the bandwidth of a circuit is not supported.
  • Change the metering plan from Metered Data to Unlimited Data. Changing the metering plan from Unlimited Data to Metered Data is not supported.
  • You can enable and disable Allow Classic Operations.

Refer to the ExpressRoute FAQ for more information on limits and limitations.

Enable the ExpressRoute premium add-on

You can enable the ExpressRoute premium add-on for your existing circuit by using the following PowerShell cmdlet:

Set-AzureDedicatedCircuitProperties -ServiceKey "*********************************" -Sku Premium

Bandwidth                        : 1000
CircuitName                      : TestCircuit
Location                         : Beijing
ServiceKey                       : *********************************
ServiceProviderName              : Beijing Telecom Ethernet
ServiceProviderProvisioningState : Provisioned
Sku                              : Premium
Status                           : Enabled

Your circuit will now have the ExpressRoute premium add-on features enabled. As soon as the command has been successfully run, billing for the premium add-on capability begins.

Disable the ExpressRoute premium add-on

Important

This operation can fail if you're using resources that are greater than what is permitted for the standard circuit.

Considerations

  • Make sure that the number of virtual networks linked to the circuit is less than 10 before you downgrade from premium to standard. If you don't do this, your update request fails, and you are billed the premium rates.
  • You must unlink all virtual networks in other geopolitical regions. If you don't, your update request fails, and you are billed the premium rates.
  • Your route table must be less than 4,000 routes for private peering. If your route table size is greater than 4,000 routes, the BGP session drops and won't be reenabled until the number of advertised prefixes goes below 4,000.

To disable the premium add-on

You can disable the ExpressRoute premium add-on for your existing circuit by using the following PowerShell cmdlet:


Set-AzureDedicatedCircuitProperties -ServiceKey "*********************************" -Sku Standard

Bandwidth                        : 1000
CircuitName                      : TestCircuit
Location                         : Beijing
ServiceKey                       : *********************************
ServiceProviderName              : Beijing Telecom Ethernet
ServiceProviderProvisioningState : Provisioned
Sku                              : Standard
Status                           : Enabled

Update the ExpressRoute circuit bandwidth

Check the ExpressRoute FAQ for supported bandwidth options for your provider. You can pick any size that is greater than the size of your existing circuit as long as the physical port (on which your circuit is created) allows.

Important

You may have to recreate the ExpressRoute circuit if there is inadequate capacity on the existing port. You cannot upgrade the circuit if there is no additional capacity available at that location.

You cannot reduce the bandwidth of an ExpressRoute circuit without disruption. Downgrading bandwidth requires you to deprovision the ExpressRoute circuit and then reprovision a new ExpressRoute circuit.

Resize a circuit

After you decide what size you need, you can use the following command to resize your circuit:

Set-AzureDedicatedCircuitProperties -ServiceKey ********************************* -Bandwidth 1000

Bandwidth                        : 1000
CircuitName                      : TestCircuit
Location                         : Beijing
ServiceKey                       : *********************************
ServiceProviderName              : Beijing Telecom Ethernet
ServiceProviderProvisioningState : Provisioned
Sku                              : Standard
Status                           : Enabled

Once your circuit has been sized up on the Microsoft side, you must contact your connectivity provider to update configurations on their side to match this change. Billing begins for the updated bandwidth option from this point on.

If you see the following error when increasing the circuit bandwidth, it means there is no sufficient bandwidth left on the physical port where your existing circuit is created. You must delete this circuit and create a new circuit of the size you need.

Set-AzureDedicatedCircuitProperties : InvalidOperation : Insufficient bandwidth available to perform this circuit
update operation
At line:1 char:1
+ Set-AzureDedicatedCircuitProperties -ServiceKey ********************* ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  + CategoryInfo          : CloseError: (:) [Set-AzureDedicatedCircuitProperties], CloudException
  + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ExpressRoute.SetAzureDedicatedCircuitPropertiesCommand

Deprovision and delete a circuit

Considerations

  • You must unlink all virtual networks from the ExpressRoute circuit for this operation to succeed. Check to see if you have any virtual networks that are linked to the circuit if this operation fails.
  • If the ExpressRoute circuit service provider provisioning state is Provisioning or Provisioned you must work with your service provider to deprovision the circuit on their side. We continue to reserve resources and bill you until the service provider completes deprovisioning the circuit and notifies us.
  • If the service provider has deprovisioned the circuit (the service provider provisioning state is set to Not provisioned), you can then delete the circuit. This stops billing for the circuit.

Delete a circuit

You can delete your ExpressRoute circuit by running the following command:

Remove-AzureDedicatedCircuit -ServiceKey "*********************************"