In this Azure PowerShell article, we will discuss the syntax and usage of the Add-AzRouteConfig PowerShell cmdlet with examples of how to use the Add-AzRouteConfig PowerShell command.
Table of Contents
Add-AzRouteConfig
This is an excellent PowerShell command to add a route to a specified Azure route table.
Syntax
Below is the syntax of the Add-AzRouteConfig PowerShell command.
Now, let’s discuss an example of the usage of this command.
Example-1:
I ran the below PowerShell script to add a route named “RouteTI” to the “TsinfoRT” route table.
$myRouteTable = Get-AzRouteTable -ResourceGroupName "DEMORG1" -Name "TsinfoRT"
Add-AzRouteConfig -Name "RouteTI" -AddressPrefix 10.3.0.0/16 -NextHopType "VnetLocal" -RouteTable $myRouteTableAfter executing the above script, I got the below output
Name : TsinfoRT
ResourceGroupName : DEMORG1
Location : northeurope
Id : /subscriptions/1cdf4300-dee5-4518-9c9c-feaa72a5cbd1/resourceGroups
/DEMORG1/providers/Microsoft.Network/routeTables/TsinfoRT
Etag : W/"53bc26b8-c27b-4f38-bffe-2f9a6944914a"
ProvisioningState : Succeeded
Tags :
Routes : [
{
"Name": "RouteTI",
"AddressPrefix": "10.3.0.0/16",
"NextHopType": "VnetLocal"
}
]
Subnets : []
You can see the same output in the below screenshot.

Add-AzRouteConfig – Video Tutorial
Related articles
Conclusion
In this Azure PowerShell article, we discussed the syntax and usage of the Add-AzRouteConfig PowerShell command. Thanks for reading this article !!!

I am Rajkishore, and I am a Microsoft Certified IT Consultant. I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machines, Logic Apps, PowerShell Commands, CLI Commands, Machine Learning, AI, Azure Cognitive Services, DevOps, etc. Not only that, I do have good real-time experience in designing and developing cloud-native data integrations on Azure or AWS, etc. I hope you will learn from these practical Azure tutorials. Read more.
