Remove-AzExpressRoutePortAuthorization
Removes an existing ExpressRoutePort authorization.
Syntax
Default (Default)
Remove-AzExpressRoutePortAuthorization
-Name <String>
-ExpressRoutePortObject <PSExpressRoutePort>
[-Force]
[-PassThru]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Remove-AzExpressRoutePortAuthorization cmdlet removes an authorization assigned to an ExpressRoutePort.
Examples
Example 1
$ERPort = Get-AzExpressRoutePort -Name "ContosoPort" -ResourceGroupName "ContosoResourceGroup"
Name : ContosoPort
ResourceGroupName : ContosoResourceGroup
Location : westcentralus
Id : /subscriptions/62364504-2406-418e-971c-05822ff72fad/resourceGroups/ContosoResourceGroup/pr
oviders/Microsoft.Network/expressRoutePorts/ContosoPort
Etag : W/"cf987288-013e-40bf-a2aa-b29d017e7b7f"
ResourceGuid : 4c0e5cdb-79e1-4cb8-a430-0ce9b24472ca
ProvisioningState : Succeeded
PeeringLocation : Area51-ERDirect
BandwidthInGbps : 100
ProvisionedBandwidthInGbps : 0
Encapsulation : QinQ
Mtu : 1500
EtherType : 0x8100
AllocationDate : Thursday, March 31, 2022
Identity : null
Links : [
{
"Name": "link1",
"Etag": "W/\"cf987288-013e-40bf-a2aa-b29d017e7b7f\"",
"Id": "/subscriptions/62364504-2406-418e-971c-05822ff72fad/resourceGroups/ContosoResou
rceGroup/providers/Microsoft.Network/expressRoutePorts/ContosoPort/links/link1",
"RouterName": "a51-test-06gmr-cis-3",
"InterfaceName": "HundredGigE15/15/19",
"PatchPanelId": "PP:0123:1110201 - Port 42",
"RackId": "A51 02050-0123-L",
"ConnectorType": "LC",
"AdminState": "Disabled",
"ProvisioningState": "Succeeded",
"MacSecConfig": {
"SciState": "Disabled",
"Cipher": "GcmAes128"
}
},
{
"Name": "link2",
"Etag": "W/\"cf987288-013e-40bf-a2aa-b29d017e7b7f\"",
"Id": "/subscriptions/62364504-2406-418e-971c-05822ff72fad/resourceGroups/ContosoResou
rceGroup/providers/Microsoft.Network/expressRoutePorts/ContosoPort/links/link2",
"RouterName": "a51-test-06gmr-cis-4",
"InterfaceName": "HundredGigE15/15/19",
"PatchPanelId": "2050:0124:1110854 - Port 42",
"RackId": "A51 02050-0124-L",
"ConnectorType": "LC",
"AdminState": "Disabled",
"ProvisioningState": "Succeeded",
"MacSecConfig": {
"SciState": "Disabled",
"Cipher": "GcmAes128"
}
}
]
Circuits : []
Remove-AzExpressRoutePortAuthorization -Name "ContosoPortAuthorization" -ExpressRoutePortObject $ERPort
Confirm
Are you sure you want to remove resource 'ContosoPortAuthorization'
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y
This example removes an authorization from an ExpressRoutePort. The first command uses
the Get-AzExpressRoutePort cmdlet to create an object reference to an ExpressRoutePort
named ContosoPort and stores the result in the variable named $ERPort.
The second command removes the ExpressRoutePort authorization ContosoPortAuthorization from
the ContosoPort.
Parameters
-AsJob
Run cmdlet in the background
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-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
-ExpressRoutePortObject
The ExpressRoutePort Object
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-Force
Do not ask for confirmation if you want to delete resource
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
Specifies the name of the ExpressRoutePort authorization that this cmdlet removes.
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
-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
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 .
Outputs