Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 2.03 KB

File metadata and controls

44 lines (31 loc) · 2.03 KB
title Configure virtual hub routing preference: Azure PowerShell
titleSuffix Azure Virtual WAN
description Learn how to configure Virtual WAN virtual hub routing preference using Azure PowerShell.
author cherylmc
ms.service azure-virtual-wan
ms.custom devx-track-azurepowershell
ms.topic concept-article
ms.date 08/13/2024
ms.author cherylmc

Configure virtual hub routing preference - Azure PowerShell

The following steps help you configure virtual hub routing preference settings using Azure PowerShell. You can also configure these settings using the Azure portal. For information about this feature, see Virtual hub routing preference.

Prerequisite

If you're using Azure PowerShell locally from your computer, verify that your az.network module version is 4.19.0 or above.

Configure

To configure virtual hub routing preference for an existing virtual hub, use the following steps.

  1. (Optional) Check the current HubRoutingPreference for an existing virtual hub.

    Get-AzVirtualHub -ResourceGroupName "[resource group name]" -Name "[virtual hub name]" | select-object HubRoutingPreference
    
  2. Update the current HubRoutingPreference for an existing virtual hub. The preference can be either VpnGateway, or ExpressRoute. The following example sets the hub routing preference to VpnGateway.

     Update-AzVirtualHub -ResourceGroupName "[resource group name]" -Name "[virtual hub name]" -HubRoutingPreference "VpnGateway"
    
  3. After the settings have saved, you can verify the configuration by running the following PowerShell command for virtual hub.

    Get-AzVirtualHub -ResourceGroupName "[resource group name]" -Name "[virtual hub name]" |  select-object HubRoutingPreference
    

Next steps

To learn more about virtual hub routing preference, see About virtual hub routing preference.