Edit

Get-AzExpressRoutePortAuthorizationKey

Gets the authorization key for an ExpressRoute port authorization.

Syntax

ByName (Default)

Get-AzExpressRoutePortAuthorizationKey
    -ResourceGroupName <String>
    -ExpressRoutePortName <String>
    -Name <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

ByParentObject

Get-AzExpressRoutePortAuthorizationKey
    -ExpressRoutePortObject <PSExpressRoutePort>
    -Name <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The Get-AzExpressRoutePortAuthorizationKey cmdlet retrieves the authorization key for an authorization on an ExpressRoute port.

The authorization key is a secret and is masked by Get-AzExpressRoutePortAuthorization. This cmdlet performs a live listKeys action against the service to return the current authorization key so that an ExpressRoute circuit owner can consume it.

Examples

Example 1: Get the authorization key by name

Get-AzExpressRoutePortAuthorizationKey -ResourceGroupName "ContosoResourceGroup" -ExpressRoutePortName "ContosoPort" -Name "ContosoPortAuthorization"
AuthorizationKey
----------------
10d01cd7-0b67-4c44-88ca-51e7effa452d

This command returns the authorization key for the authorization named ContosoPortAuthorization on the ExpressRoute port ContosoPort.

Example 2: Get the authorization key from a port object

$ERPort = Get-AzExpressRoutePort -Name "ContosoPort" -ResourceGroupName "ContosoResourceGroup"
$ERPort | Get-AzExpressRoutePortAuthorizationKey -Name "ContosoPortAuthorization"
AuthorizationKey
----------------
10d01cd7-0b67-4c44-88ca-51e7effa452d

The first command gets the ExpressRoute port ContosoPort and stores it in the variable $ERPort. The second command pipes that port to Get-AzExpressRoutePortAuthorizationKey to retrieve the authorization key.

Parameters

-DefaultProfile

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

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExpressRoutePortName

The name of the ExpressRoute port.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:PortName

Parameter sets

ByName
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExpressRoutePortObject

The ExpressRoute port object.

Parameter properties

Type:PSExpressRoutePort
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByParentObject
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

The name of the authorization.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AuthorizationName

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceGroupName

The resource group name.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByName
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

PSExpressRoutePort

Outputs

PSExpressRouteAuthorizationKey