Get-AzureRmExpressRouteCircuitAuthorization

Gets information about ExpressRoute circuit authorizations.

Warning

The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.

Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.

Syntax

Get-AzureRmExpressRouteCircuitAuthorization
   [-Name <String>]
   -ExpressRouteCircuit <PSExpressRouteCircuit>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Get-AzureRmExpressRouteCircuitAuthorization cmdlet gets information about the authorizations assigned to an ExpressRoute circuit. ExpressRoute circuits connect your on-premises network to the Microsoft cloud by using a connectivity provider instead of the public Internet. The owner of an ExpressRoute circuit can create as many as 10 authorizations for each circuit; these authorizations generate an authorization key that can be used by a virtual network owner to connect his or her network to the circuit (one authorization per virtual network). Authorization keys, as well as other information about the authorization, can be viewed at any time by running Get-AzureRmExpressRouteCircuitAuthorization.

Examples

Example 1: Get all ExpressRoute authorizations

$Circuit = Get-AzureRmExpressRouteCircuit -Name "ContosoCircuit" -ResourceGroupName "ContosoResourceGroup"
Get-AzureRmExpressRouteCircuitAuthorization -Circuit $Circuit

These commands return information about all the ExpressRoute authorizations associated with an ExpressRoute circuit. The first command uses the Get-AzureRmExpressRouteCircuit cmdlet to create an object reference a circuit named ContosoCircuit; that object reference is stored in the variable $Circuit. The second command then uses that object reference and the Get-AzureRmExpressRouteCircuitAuthorization cmdlet to return information about the authorizations associated with ContosoCircuit.

Example 2: Get all ExpressRoute authorizations using the Where-Object cmdlet

$Circuit = Get-AzureRmExpressRouteCircuit -Name "ContosoCircuit" -ResourceGroupName "ContosoResourceGroup"
 Get-AzureRmExpressRouteCircuitAuthorization -Circuit $Circuit | Where-Object {$_.AuthorizationUseStatus -eq "Available"}

These commands represent a variation on the commands used in Example 1. In this case, however, information is returned only for those authorizations that are available for use (that is, for authorizations that have not been assigned to a virtual network). To do this, the circuit authorization information is returned in command 2 and is piped to the Where-Object cmdlet. Where-Object then picks out only those authorizations where the AuthorizationUseStatus property is set to Available. To list only those authorizations that are not available, use this syntax for the Where clause: {$_.AuthorizationUseStatus -ne "Available"}

Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Type:IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ExpressRouteCircuit

Specifies the ExpressRoute circuit authorization.

Type:PSExpressRouteCircuit
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

Specifies the name of the ExpressRoute circuit authorization that this cmdlet gets. -Name "ContosoCircuitAuthorization"

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

PSExpressRouteCircuit

Parameters: ExpressRouteCircuit (ByValue)

Outputs

PSExpressRouteCircuitAuthorization