Remove-AzStorageFile
语法
ShareName (默认值)
Remove-AzStorageFile
[-ShareName] <String>
[-Path] <String>
[-PassThru]
[-DisAllowTrailingDot]
[-Context <IStorageContext>]
[-ServerTimeoutPerRequest <Int32>]
[-ClientTimeoutPerRequest <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-ConcurrentTaskCount <Int32>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Share
Remove-AzStorageFile
[-ShareClient] <ShareClient>
[-Path] <String>
[-PassThru]
[-Context <IStorageContext>]
[-ServerTimeoutPerRequest <Int32>]
[-ClientTimeoutPerRequest <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-ConcurrentTaskCount <Int32>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Directory
Remove-AzStorageFile
[-ShareDirectoryClient] <ShareDirectoryClient>
[-Path] <String>
[-PassThru]
[-Context <IStorageContext>]
[-ServerTimeoutPerRequest <Int32>]
[-ClientTimeoutPerRequest <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-ConcurrentTaskCount <Int32>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
File
Remove-AzStorageFile
[-ShareFileClient] <ShareFileClient>
[-PassThru]
[-Context <IStorageContext>]
[-ServerTimeoutPerRequest <Int32>]
[-ClientTimeoutPerRequest <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-ConcurrentTaskCount <Int32>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
Remove-AzStorageFile cmdlet 删除文件。
示例
示例 1:从文件共享中删除文件
Remove-AzStorageFile -ShareName "ContosoShare06" -Path "ContosoFile22"
此命令从名为 ContosoShare06 的文件共享中删除名为 ContosoFile22 的文件。
示例 2:使用文件共享对象从文件共享获取文件
Get-AzStorageShare -Name "ContosoShare06" | Remove-AzStorageFile -Path "ContosoFile22"
此命令使用 Get-AzStorageShare cmdlet 获取名为 ContosoShare06 的文件共享,然后使用管道运算符将该对象传递给当前 cmdlet。
当前命令从 ContosoShare06 中删除名为 ContosoFile22 的文件。
参数
-ClientTimeoutPerRequest
指定一个服务请求的客户端超时间隔(以秒为单位)。
如果上一次调用在指定的时间间隔内失败,则此 cmdlet 将重试请求。
如果此 cmdlet 在间隔过前未收到成功的响应,则此 cmdlet 将返回错误。
参数属性
| 类型: | Nullable<T>[Int32]
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
| 别名: | ClientTimeoutPerRequestInSeconds |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-ConcurrentTaskCount
指定最大并发网络调用数。
可以使用此参数通过指定并发网络调用的最大数目来限制本地 CPU 和带宽使用量的并发性。
指定的值是绝对计数,不乘以核心计数。
此参数可帮助减少低带宽环境中的网络连接问题,例如每秒 100 千比特。
默认值为 10。
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-Confirm
在运行 cmdlet 之前,提示你进行确认。
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-Context
指定 Azure 存储上下文。
若要获取存储上下文,请使用 New-AzStorageContext cmdlet。
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | True |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-DisAllowTrailingDot
禁止尾随点 (.) 后缀目录和文件名。
参数属性
参数集
ShareName
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-PassThru
指示此 cmdlet 返回反映作成功的 布尔值 。
默认情况下,此 cmdlet 不返回值。
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-Path
指定文件的路径。
此 cmdlet 删除此参数指定的文件。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
ShareName
| Position: | 1 |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
Share
| Position: | 1 |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
Directory
| Position: | 1 |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-ServerTimeoutPerRequest
指定请求的服务器部分超时期限的长度。
参数属性
| 类型: | Nullable<T>[Int32]
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
| 别名: | ServerTimeoutPerRequestInSeconds |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-ShareClient
ShareClient 对象指示将删除文件的共享。
参数属性
参数集
Share
| Position: | 0 |
| 必需: | True |
| 来自管道的值: | True |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
-ShareDirectoryClient
ShareDirectoryClient 对象指示将删除该文件的基文件夹。
参数属性
参数集
Directory
| Position: | 0 |
| 必需: | True |
| 来自管道的值: | True |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
-ShareFileClient
ShareFileClient 对象指示文件将被删除。
参数属性
参数集
File
| Position: | 0 |
| 必需: | True |
| 来自管道的值: | True |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
-ShareName
指定文件共享的名称。
此 cmdlet 删除此参数所指定的共享中的文件。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
ShareName
| Position: | 0 |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-WhatIf
显示 cmdlet 运行时会发生什么情况。
命令脚本未运行。
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
CommonParameters
此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters。
输出