The Restore-AzDataLakeStoreDeletedItem cmdlet restores a deleted file or folder in Data Lake Store. Requires the path of deleted item in trash returned by Get-AzDataLakeStoreDeletedItem.
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 1: Restore a file from the Data Lake Store using -force option
Restore user data ?
From - 927e8fb1-a287-4353-b50e-3b4a39ae4088
To - adl://ml1ptrashtest.azuredatalake.com/test4/file_1115
Type - file
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y
This command restores a file from Data Lake Store using user confirmation
Parameters
-Account
Specifies the name of the Data Lake Store account.
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.
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.