Get-AzExpressRouteCircuitAuthorization

Gets information about ExpressRoute circuit authorizations.

Syntax

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

Description

The Get-AzExpressRouteCircuitAuthorization 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-AzExpressRouteCircuitAuthorization.

Examples

Example 1: Get all ExpressRoute authorizations

$Circuit = Get-AzExpressRouteCircuit -Name "ContosoCircuit" -ResourceGroupName "ContosoResourceGroup"
Get-AzExpressRouteCircuitAuthorization -ExpressRouteCircuit $Circuit

These commands return information about all the ExpressRoute authorizations associated with an ExpressRoute circuit. The first command uses the Get-AzExpressRouteCircuit 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-AzExpressRouteCircuitAuthorization cmdlet to return information about the authorizations associated with ContosoCircuit.

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

$Circuit = Get-AzExpressRouteCircuit -Name "ContosoCircuit" -ResourceGroupName "ContosoResourceGroup"
 Get-AzExpressRouteCircuitAuthorization -ExpressRouteCircuit $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:AzContext, 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

Outputs

PSExpressRouteCircuitAuthorization