Export-AzureRmDataLakeStoreChildItemProperties

Exports the properties (Disk usage and Acl) for the entire tree from the specified path to a ouput path

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

Export-AzureRmDataLakeStoreChildItemProperties
      [-Account] <String>
      [-Path] <DataLakeStorePathInstance>
      [-OutputPath] <String>
      [-SaveToAdl]
      [-IncludeFile]
      [-MaximumDepth <Int32>]
      [-Concurrency <Int32>]
      [-GetDiskUsage]
      [-PassThru]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Export-AzureRmDataLakeStoreChildItemProperties
      [-Account] <String>
      [-Path] <DataLakeStorePathInstance>
      [-OutputPath] <String>
      [-SaveToAdl]
      [-IncludeFile]
      [-MaximumDepth <Int32>]
      [-Concurrency <Int32>]
      [-GetDiskUsage]
      [-GetAcl]
      [-HideConsistentAcl]
      [-PassThru]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Export-AzureRmDataLakeStoreChildItemProperties
      [-Account] <String>
      [-Path] <DataLakeStorePathInstance>
      [-OutputPath] <String>
      [-SaveToAdl]
      [-IncludeFile]
      [-MaximumDepth <Int32>]
      [-Concurrency <Int32>]
      [-GetAcl]
      [-HideConsistentAcl]
      [-PassThru]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Export-AzureRmDataLakeStoreChildItemProperties is used to report the ADLS space usage or/and ACL usage for the given directory and it's sub directories and files.

Examples

Example 1: Get the disk usage and ACL usage for all subdirectories and files

PS C:\> Export-AzureRmDataLakeStoreChildItemProperties -Account ContosoADL -Path /a -OutputPath "C:\Users\contoso\Desktop\DumpFile.txt" -GetAcl -GetDiskUsage -IncludeFile

Get the disk usage and ACL usage for all subdirectories and files under /a. IncludeFile ensures the usage is reported for files also

Example 2: Get the ACL usage for all subdirectories and files with the consistent ACL hidden

PS C:\> $fullAcl="user:contoso-userid:--x|user::rwx|other::---|group::rwx"
PS C:\> $newFullAcl = $fullAcl.Split("{|}");
PS C:\> Set-AzureRmDataLakeStoreItemAcl -Account ContosoADL -Path /a -Acl $newFullAcl -Recurse -Debug

PS C:\> Export-AzureRmDataLakeStoreChildItemProperties -Account ContosoADL -Path /a -OutputPath "C:\Users\contoso\Desktop\DumpFile.txt" -GetAcl -HideConsistentAcl -IncludeFile

Get the ACL usage for all subdirectories and files under /a. IncludeFile ensures the usage is reported for files also. HideconsistentAcl in this case will show the Acl of /a, not it's children since all of the children has same acl as /a. This flag skips the acl ouput of subtree if all it's acls are same as the root.

Parameters

-Account

The Data Lake Store account to execute the filesystem operation in

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

-Concurrency

Indicates the number of files/directories processed in parallel. Default will be computed as a best effort based on system specification.

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:None
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

-GetAcl

Retrieves the acl starting from the root path

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

-GetDiskUsage

Retrieves the disk usage starting from the root path

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

-HideConsistentAcl

Do not show directory subtree if the ACLs are the same throughout the entire subtree. This makes it easier to see only the paths up to which the ACLs differ.For example if all files and folders under /a/b are the same, do not show the subtreeunder /a/b, and just output /a/b with 'True' in the Consistent ACL columnCannot be set if IncludeFiles is not set, because consistent Acl cannot be determined without retrieving acls for the files.

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

-IncludeFile

Show stats at file level (default is to show directory-level info only)

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

-MaximumDepth

Maximum depth from the root directory till which disk usage or acl is displayed

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

-OutputPath

Path to output file. Can be a Local path or Adl Path. By default it is local. If SaveToAdl is pecified then it is an ADL path in the same account

Type:String
Position:2
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-PassThru

Indicates a boolean response should be returned indicating the result of the delete operation.

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

-Path

The path in the specified Data Lake account that should be retrieve. Can be a file or folder In the format '/folder/file.txt', where the first '/' after the DNS indicates the root of the file system.

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

-SaveToAdl

If passed then saves the dump file to ADL. The DumpFile wil be a ADL path in that case

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

Inputs

String

DataLakeStorePathInstance

SwitchParameter

Int32

Outputs

Boolean