Add-AzExpressRouteCircuitAuthorization
Adds an ExpressRoute circuit authorization.
Syntax
Default (Default)
Add-AzExpressRouteCircuitAuthorization
-Name <String>
-ExpressRouteCircuit <PSExpressRouteCircuit>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Add-AzExpressRouteCircuitAuthorization cmdlet adds an authorization 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). Add-AzExpressRouteCircuitAuthorization adds a new authorization to a circuit and, at the same time, generates the corresponding authorization key. These keys can be viewed at any time by running the Get-AzExpressRouteCircuitAuthorization cmdlet and, as needed, can then be copied and forwarded to the appropriate network owner. Note that, after running Add-AzExpressRouteCircuitAuthorization, you must call the Set-AzExpressRouteCircuit cmdlet to activate the key. If you do not call Set-AzExpressRouteCircuit the authorization will be added to the circuit but will not be enabled for use.
Examples
Example 1: Add an authorization to the specified ExpressRoute circuit
$Circuit = Get-AzExpressRouteCircuit -Name "ContosoCircuit" -ResourceGroupName "ContosoResourceGroup"
Add-AzExpressRouteCircuitAuthorization -Name "ContosoCircuitAuthorization" -ExpressRouteCircuit $Circuit
Set-AzExpressRouteCircuit -ExpressRouteCircuit $Circuit
The commands in this example add a new authorization to an existing ExpressRoute circuit. The first command uses Get-AzExpressRouteCircuit to create an object reference to a circuit named ContosoCircuit. That object reference is stored in a variable named $Circuit. In the second command, the Add-AzExpressRouteCircuitAuthorization cmdlet is used to add a new authorization (ContosoCircuitAuthorization) to the ExpressRoute circuit. This command adds the authorization but does not activate that authorization. Activating an authorization requires the Set-AzExpressRouteCircuit shown in the final command in the example.
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 |
-ExpressRouteCircuit
Specifies the ExpressRoute circuit that this cmdlet adds the authorization to.
Parameter properties
Type: | PSExpressRouteCircuit |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Name
Specifies the name of the circuit authorization to be added.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
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.