Set-AzDataLakeStoreItemAcl
Modifies the ACL of a file or folder in Data Lake Store.
Syntax
Default (Default)
Set-AzDataLakeStoreItemAcl
[-Account] <String>
[-Path] <DataLakeStorePathInstance>
[-Acl] <DataLakeStoreItemAce[]>
[-PassThru]
[-Recurse]
[-Concurrency <Int32>]
[-ShowProgress]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Set-AzDataLakeStoreItemAcl 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
$ACL = Get-AzDataLakeStoreItemAclEntry -AccountName "ContosoADL" -Path /
Set-AzDataLakeStoreItemAcl -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
$ACL = Get-AzDataLakeStoreItemAclEntry -AccountName "ContosoADL" -Path /Folder1
Set-AzDataLakeStoreItemAcl -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.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AccountName
Parameter sets
(All)
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Acl
Specifies an ACL for a file or a folder.
Parameter properties
Parameter sets
(All)
Position: 2
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: True
Value from remaining arguments: False
-Concurrency
Number of files/directories processed in parallel. Optional: a reasonable default will be selected.
Parameter properties
Type: Int32
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: True
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: False
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
-PassThru
Indicates the resulting ACL should be returned.
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: True
Value from remaining arguments: False
-Path
Specifies the Data Lake Store path of the file or folder, starting with the root directory (/).
Parameter properties
Parameter sets
(All)
Position: 1
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Recurse
Indicates the ACL to be set recursively to the child subdirectories and files
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: True
Value from remaining arguments: False
-ShowProgress
If passed then progress status is showed. Only applicable when recursive Acl set is done.
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: False
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