Set-AzureRmDataLakeStoreItemAcl

Modifies the ACL of a file or folder in Data Lake Store.

Warning

The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.

Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.

Syntax

Set-AzureRmDataLakeStoreItemAcl
   [-Account] <String>
   [-Path] <DataLakeStorePathInstance>
   [-Acl] <DataLakeStoreItemAce[]>
   [-PassThru]
   [-Recurse]
   [-Concurrency <Int32>]
   [-ShowProgress]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Set-AzureRmDataLakeStoreItemAcl cmdlet modifies the access control list (ACL) of a file or folder in Data Lake Store.

Examples

Example 1: Set the ACL for a file and a folder

PS C:\>$ACL = Get-AzureRmDataLakeStoreItemAclEntry -AccountName "ContosoADL" -Path /
PS C:\> Set-AzureRmDataLakeStoreItemAcl -AccountName "ContosoADL" -Path "/MyFiles/Test.txt" -Acl $ACL

The first command gets the ACL for the root directory of the ContosoADL account, and then stores it in the $ACL variable. The second command sets the ACL for the file Test.txt to the one in $ACL.

Example 2: Set the ACL for folder recursively

PS C:\>$ACL = Get-AzureRmDataLakeStoreItemAclEntry -AccountName "ContosoADL" -Path /Folder1
PS C:\> Set-AzureRmDataLakeStoreItemAcl -AccountName "ContosoADL" -Path "/Folder2" -Acl $ACL -Recurse -Concurrency 128

The first command gets the ACL for the directory Folder1 of the ContosoADL account, and then stores it in the $ACL variable. The second command sets the ACL recursively to Folder2 and its sub directories and files to the one in $ACL.

Parameters

-Account

Specifies the name of the Data Lake Store account.

Type:String
Aliases:AccountName
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Acl

Specifies an ACL for a file or a folder.

Type:DataLakeStoreItemAce[]
Position:2
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Concurrency

Number of files/directories processed in parallel. Optional: a reasonable default will be selected.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

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

Type:IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PassThru

Indicates the resulting ACL should be returned.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Path

Specifies the Data Lake Store path of the file or folder, starting with the root directory (/).

Type:DataLakeStorePathInstance
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Recurse

Indicates the ACL to be set recursively to the child subdirectories and files

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-ShowProgress

If passed then progress status is showed. Only applicable when recursive Acl set is done.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

DataLakeStorePathInstance

DataLakeStoreItemAce[]

SwitchParameter

Int32

Outputs

DataLakeStoreItemAce

If PassThru is specified, will return the resulting list of ACL entries.