Edit

Share via


Get-AzDataLakeGen2DeletedItem

List all deleted files or directories from a directory or filesystem root.

Syntax

Default (Default)

Get-AzDataLakeGen2DeletedItem
    [-FileSystem] <String>
    [[-Path] <String>]
    [-MaxCount <Int32>]
    [-ContinuationToken <String>]
    [-AsJob]
    [-Context <IStorageContext>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The Get-AzDataLakeGen2DeletedItem cmdlet lists all deleted files or directories from a directory or filesystem in an Azure storage account. This cmdlet only works if Hierarchical Namespace is enabled for the Storage account. This kind of account can be created by run "New-AzStorageAccount" cmdlet with "-EnableHierarchicalNamespace $true".

Examples

Example 1: List all deleted files or directories from a Filesystem

Get-AzDataLakeGen2DeletedItem -FileSystem "filesystem1"
FileSystem Name: filesystem1

Path                 DeletionId           DeletedOn            RemainingRetentionDays
----                 ----------           ---------            ----------------------
dir0/dir1/file1      132658816156507617   2021-05-19 07:06:55Z 3
dir0/dir2            132658834541610122   2021-05-19 07:37:34Z 3
dir0/dir2/file3      132658834534174806   2021-05-19 07:37:33Z 3

This command lists all deleted files or directories from a Filesystem.

Example 2: List all deleted files or directories from a directory

Get-AzDataLakeGen2DeletedItem -FileSystem "filesystem1" -Path dir0/dir2
FileSystem Name: filesystem1

Path                 DeletionId           DeletedOn            RemainingRetentionDays
----                 ----------           ---------            ----------------------
dir0/dir2            132658834541610122   2021-05-19 07:37:34Z 3
dir0/dir2/file3      132658834534174806   2021-05-19 07:37:33Z 3

This command lists all deleted files or directories from a directory.

Parameters

-AsJob

Run cmdlet in the background

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

-Context

Azure Storage Context Object

Parameter properties

Type:IStorageContext
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-ContinuationToken

Continuation Token.

Parameter properties

Type:String
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

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

-FileSystem

FileSystem name

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-MaxCount

The max count of the blobs that can return.

Parameter properties

Type:

Nullable<T>[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:False
Value from remaining arguments:False

-Path

The path in the specified FileSystem that should be retrieved. Can be a directory In the format 'directory1/directory2/', Skip set this parameter to list items from root directory of the Filesystem.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:False
Value from pipeline:True
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.

Inputs

String

IStorageContext

Outputs

AzureDataLakeGen2DeletedItem