Edit

Share via


Remove-AzureStorSimpleAccessControlRecord

Deletes an access control record from the service configuration.

Note

The cmdlets referenced in this documentation are for managing legacy Azure resources that use Azure Service Manager (ASM) APIs. This legacy PowerShell module isn't recommended when creating new resources since ASM is scheduled for retirement. For more information, see Azure Service Manager retirement.

The Az PowerShell module is the recommended PowerShell module for managing Azure Resource Manager (ARM) resources with PowerShell.

Syntax

IdentifyByName

Remove-AzureStorSimpleAccessControlRecord
    -ACRName <String>
    [-WaitForComplete]
    [-Force]
    [-Profile <AzureSMProfile>]
    [<CommonParameters>]

IdentifyByObject

Remove-AzureStorSimpleAccessControlRecord
    -ACR <AccessControlRecord>
    [-WaitForComplete]
    [-Force]
    [-Profile <AzureSMProfile>]
    [<CommonParameters>]

Description

The Remove-AzureStorSimpleAccessControlRecord cmdlet deletes an access control record from the service configuration.

Examples

Example 1: Remove an Access Control record

PS C:\>Remove-AzureStorSimpleAccessControlRecord -ACRName "Acr10" -WaitForComplete -Force
VERBOSE: ClientRequestId: 574aeb7f-fbc9-46d5-bc68-1bfe4487bd8b_PS
VERBOSE: ClientRequestId: 985afe84-ef95-47cb-8c8f-df094530334b_PS
VERBOSE: About to run a job to remove your ACR!
VERBOSE: ClientRequestId: 7eb7e1a0-2288-44da-b64c-5bf86a6b9aaf_PS


JobId        : f7934db5-8363-4152-b38e-b9a5d91f97b9
JobResult    : Succeeded
JobStatus    : Completed
ErrorCode    :
ErrorMessage :
JobSteps     : {}

VERBOSE: The job created for your delete operation has completed successfully.

This command deletes the access control record named Acr10. This command specifies the WaitForComplete parameter, and, therefore, the command waits until the operation is complete, and then returns a TaskStatusInfo object.

Example 2: Remove an Access Control record by using the pipeline

PS C:\>Get-AzureStorSimpleAccessControlRecord -ACRName "Acr10" | Remove-AzureStorSimpleAccessControlRecord -Force
VERBOSE: ClientRequestId: ff8d8bd6-4c92-4ab6-8fde-e9344a253da3_PS
VERBOSE: ClientRequestId: f71c74f3-33b9-40d1-b8d5-12363e98412f_PS
VERBOSE: ClientRequestId: d5d809d0-ec22-4e45-97ee-a56edc41e503_PS
VERBOSE: About to create a job to remove your ACR!
VERBOSE: ClientRequestId: 6ffa6bc8-37b3-49ff-bafc-721b360f09cb_PS
294a0208-a43f-4d80-b824-2319cd77c5e6
VERBOSE: The delete task is submitted successfully. Please use the command Get-AzureStorSimpleTask -InstanceId
294a0208-a43f-4d80-b824-2319cd77c5e6 for tracking the task's status

This command uses the Get-AzureStorSimpleAccessControlRecord to get the AccessControlRecord named Acr10, and then passes that object to the current cmdlet by using the pipeline operator. The command starts the operation that removes the AccessControlRecord object, and then returns a TaskResponse object. To see the status of the task, use the Get-AzureStorSimpleTask cmdlet.

Parameters

-ACR

Specifies an AccessControlRecord object to delete. To obtain an AccessControlRecord object, use the Get-AzureStorSimpleAccessControlRecord cmdlet.

Parameter properties

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

Parameter sets

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

-ACRName

Specifies a name of the access control record to delete.

Parameter properties

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

Parameter sets

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

-Force

Indicates that this cmdlet does not prompt you for confirmation.

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

-Profile

Specifies an Azure profile.

Parameter properties

Type:AzureSMProfile
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

-WaitForComplete

Indicates that this cmdlet waits for the operation to complete before it returns control to the Windows PowerShell console.

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

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

AccessControlRecord

This cmdlet accepts an AccessControlRecord object. An AccessControlRecord object contains the following fields:

  • GlobalId (String)
  • InitiatorName (String)
  • InstanceId (String)
  • Name (String)
  • OperationInProgress (OperationInProgress)
  • VolumeCount (int)

Outputs

TaskStatusInfo, TaskResponse

This cmdlet returns a TaskStatusInfo object if you specify the WaitForComplete parameter. If you do not specify that parameter, it returns a TaskResponse object.