We help IT Professionals succeed at work.

Azure Manage Express Route from PowerShell

davidtolo asked
I am able to connect to Azure with PowerShell but I can not run any expressroute commands:

For example:
PS C:\Windows\System32> Get-AzureDedicatedCircuit
Get-AzureDedicatedCircuit : The term 'Get-AzureDedicatedCircuit' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Get-AzureDedicatedCircuit
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (Get-AzureDedicatedCircuit:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

When I google it it says import-module ExpressRoute.psd1 but I can't find that file anywhere on my computer.
Watch Question

Citrix Technology Professional / Director of TechDev Services, IPM
Import-Module 'C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement\Azure\Azure.psd1'
Import-Module 'C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement\Azure\ExpressRoute\ExpressRoute.psd1'

Open in new window

Top Expert 2014

For any new work with Azure I would recommend using the Az module - https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-3.3.0
The naming of cmdlets is more consistent across the board.  In general, if you find any examples that mention a cmdlet name in the form of *-AzureRm*, or *-Azure* (like Get-AzureExpressRouteCircuit), then the equivalent in the current Az module is to just shorten "AzureRm" or "Azure" to "Az".  So the cmdlet you would be using is Get-AzExpressRouteCircuit.