大网数据广告活动
Windows排障命令

vssadmin delete shadows

· 52CE 我爱测

A description of the vssadmin delete shadows command, which deletes a specified volume's shadow copies.

Deletes a specified volume's shadow copies. You can only delete shadow copies with the client-accessible type.

Note: If you encounter the error "Error: Snapshots were found, but they were outside of your allowed context," the shadow copies are not client-accessible and cannot be deleted with vssadmin. Use the diskshadow command instead to manage and delete those shadow copies.

Syntax

vssadmin delete shadows /for=<ForVolumeSpec> [/oldest | /all | /shadow=<ShadowID>] [/quiet]

Parameters

Parameter Description
/for=<ForVolumeSpec> Specifies which volume's shadow copy will be deleted.
/oldest Deletes only the oldest shadow copy.
/all Deletes all of the specified volume's shadow copies.
/shadow=<ShadowID> Deletes the shadow copy specified by ShadowID. To get the shadow copy ID, use the vssadmin list shadows command. When you enter a shadow copy ID, use the following format, where each X represents a hexadecimal character:XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
/quiet Specifies that the command won't display messages while running.

Examples

Caution: Deleting a shadow copy is permanent. You can't recover a deleted shadow copy, and you lose any previous versions or restore points that depend on it. Target only the volume or shadow copy you intend to remove, and confirm the shadow copy IDs with vssadmin list shadows before you delete anything. This command deletes only shadow copies that have the client-accessible type.

To delete the oldest shadow copy of volume C, type:

vssadmin delete shadows /for=c: /oldest

To delete all client-accessible shadow copies of volume D, type:

vssadmin delete shadows /for=d: /all

To delete a single client-accessible shadow copy by its ID, first run vssadmin list shadows to find the shadow copy ID. Then run the following command, replacing c: with the volume that hosts the shadow copy and <ShadowID> with the ID you want to delete. Enter the ID in the format XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX, where each X is a hexadecimal character:

vssadmin delete shadows /for=c: /shadow=<ShadowID>

To delete all client-accessible shadow copies of volume D without showing progress messages, add the /quiet parameter:

vssadmin delete shadows /for=d: /all /quiet

Related links

Source: Microsoft Learn / Windows Server documentation by Microsoft and contributors (upstream author metadata: robinharwood). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Server documentation
适用范围
Windows Server · Source date 05/18/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。