Edit

Share via


Get-AzDataLakeStoreDeletedItem

Searches for deleted entries in trash which match the filter.

Syntax

Default (Default)

Get-AzDataLakeStoreDeletedItem
    [-Account] <String>
    [-Filter] <String>
    [-Count <Int32>]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The Get-AzDataLakeStoreDeletedItem cmdlet searches the deleted files or folders in Data Lake Store which match the given filter. It displays the following attributes of the deleted items - OriginalPath, TrashDirPath, Type, CreationTime. This could be a long running operation as it may have to search through millions of files in trash and could be run as a job. Caution: Undeleting files is a best effort operation. There are no guarantees that a file can be restored once it is deleted. The use of this API is enabled via allowlisting. If your ADL account is not allowlisted, then using this api will throw Not implemented exception. For further information and assistance please contact Microsoft support.

Examples

Example: Get details of a file from the Data Lake Store

Get-AzDataLakeStoreDeletedItem -Account ml1ptrashtest -Filter test0/file_123
TrashDirPath                         OriginalPath                                          Type CreationTime
------------                         ------------                                          ---- ------------
cd6ad5ce-792b-4812-8a33-8f9ed19eb532 adl://ml1ptrashtest.azuredatalake.com/test0/file_1230 FILE 2/8/2019 8:12:18 AM
356cfd42-39c7-451e-96cb-9f47883d91e2 adl://ml1ptrashtest.azuredatalake.com/test0/file_1232 FILE 2/8/2019 8:12:18 AM
e7b30ac8-2dbc-43a3-8ca6-2d420ac0c488 adl://ml1ptrashtest.azuredatalake.com/test0/file_1237 FILE 2/8/2019 8:12:18 AM

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

-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

-Count

Specifies the number of results the user wants to find. The query runs until it finds Count results or it searches through entire trash, whichever happens first.

Parameter properties

Type:Int32
Default value:1
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

-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

-Filter

Specifies the search query. A more specific value gives more relevant results.

Parameter properties

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

Parameter sets

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

Outputs

System.Collections.Generic.List<Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreDeletedItem>

Notes

If you want to fetch the results in pages with pagination support, use the Get-AzDataLakeStoreDeletedItemsWithToken cmdlet instead.