你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Get-AzDataLakeGen2DeletedItem
列出目录或文件系统根目录中的所有已删除文件或目录。
语法
Get-AzDataLakeGen2DeletedItem
[-FileSystem] <String>
[[-Path] <String>]
[-MaxCount <Int32>]
[-ContinuationToken <String>]
[-AsJob]
[-Context <IStorageContext>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
说明
Get-AzDataLakeGen2DeletedItem cmdlet 列出了 Azure 存储帐户中目录或文件系统中的所有已删除文件或目录。 仅当为存储帐户启用了分层命名空间时,此 cmdlet 才有效。 可以使用“-EnableHierarchicalNamespace $true”运行“New-AzStorageAccount”cmdlet 来创建此类帐户。
示例
示例 1:列出文件系统中的所有已删除文件或目录
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
此命令列出文件系统中的所有已删除文件或目录。
示例 2:列出目录中所有已删除的文件或目录
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
此命令列出目录中所有已删除的文件或目录。
参数
-AsJob
在后台运行 cmdlet
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Context
Azure 存储上下文对象
类型: | IStorageContext |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |
-ContinuationToken
继续标记。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
类型: | IAzureContextContainer |
别名: | AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-FileSystem
FileSystem 名称
类型: | String |
Position: | 0 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-MaxCount
可返回的 Blob 的最大计数。
类型: | Nullable<T>[Int32] |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Path
应检索的指定 FileSystem 中的路径。 可以是“directory1/directory2/”格式的目录,跳过将此参数设置为列出文件系统根目录中的项。
类型: | String |
Position: | 1 |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |