Set-AzureRmDataLakeStoreItemAcl
Modifies the ACL of a file or folder in Data Lake Store.
Important
Because Az PowerShell modules now have all the capabilities of AzureRM PowerShell modules and more, we'll retire AzureRM PowerShell modules on 29 February 2024.
To avoid service interruptions, update your scripts that use AzureRM PowerShell modules to use Az PowerShell modules by 29 February 2024. To automatically update your scripts, follow the quickstart guide.
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
Specifies the name of the Data Lake Store account.
Type: | String |
Aliases: | AccountName |
Position: | 0 |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies an ACL for a file or a folder.
Type: | DataLakeStoreItemAce[] |
Position: | 2 |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Number of files/directories processed in parallel. Optional: a reasonable default will be selected.
Type: | Int32 |
Position: | Named |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with azure.
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Indicates the resulting ACL should be returned.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the Data Lake Store path of the file or folder, starting with the root directory (/).
Type: | DataLakeStorePathInstance |
Position: | 1 |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Indicates the ACL to be set recursively to the child subdirectories and files
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | False |
If passed then progress status is showed. Only applicable when recursive Acl set is done.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Outputs
If PassThru is specified, will return the resulting list of ACL entries.