Set-​Azure​Rm​Data​Lake​Store​Item​Acl

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

Syntax

Set-AzureRmDataLakeStoreItemAcl
   [-Account] <String>
   [-Path] <DataLakeStorePathInstance>
   [-Acl] <DataLakeStoreItemAce[]>
   [-PassThru]
   [-Confirm]
   [-WhatIf]
   [<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-AzureRmDataLakeStoreItemAcl -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.

Required Parameters

-Account

Specifies the name of the Data Lake Store account.

Type:String
Aliases:AccountName
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Acl

Specifies an ACL for a file or a folder.

Type:DataLakeStoreItemAce[]
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
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
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Confirm

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
-PassThru

Indicates the resulting ACL should be returned.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
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
Accept pipeline input:False
Accept wildcard characters:False

Outputs

IEnumerable<DataLakeStoreItemAce>

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