从选中的卷删除驱动器号或装入点。Removes a drive letter or mount point from the volume with focus. 如果使用了 all 参数,就会删除所有当前驱动器号和装入点。If the all parameter is used, all current drive letters and mount points are removed. 如果未指定驱动器号或装入点,则 DiskPart 将删除其遇到的第一个驱动器号或装入点。If no drive letter or mount point is specified, then DiskPart removes the first drive letter or mount point it encounters.

"删除" 命令还可用于更改与可移动驱动器关联的驱动器号。The remove command can also be used to change the drive letter associated with a removable drive. 不能删除系统卷、启动卷或分页卷上的驱动器号。You can't remove the drive letters on system, boot, or paging volumes. 此外,无法删除 OEM 分区、具有无法识别的 GUID 的任何 GPT 分区或任何特殊的非数据分区分区(如 EFI 系统分区)的驱动器号。In addition, you can't remove the drive letter for an OEM partition, any GPT partition with an unrecognized GUID, or any of the special, non-data, GPT partitions such as the EFI system partition.


必须选择一个卷," 删除 " 命令才会成功。A volume must be selected for the remove command to succeed. 使用 " 选择卷 " 命令选择磁盘,并将焦点移动到该磁盘。Use the select volume command to select a disk and shift the focus to it.


remove [{letter=<drive> | mount=<path> [all]}] [noerr]


参数Parameter 说明Description
字母 =<drive>letter=<drive> 要删除的驱动器号。The drive letter to remove.
装载 =<path>mount=<path> 要删除的装入点路径。The mount point path to remove.
全部all 删除所有当前的驱动器号和装入点。Removes all current drive letters and mount points.
noerrnoerr 仅用于脚本。For scripting only. 出现错误时,DiskPart 继续处理命令,就像未发生错误一样。When an error is encountered, DiskPart continues to process commands as if the error did not occur. 如果没有此参数,则错误会导致 DiskPart 退出并出现错误代码。Without this parameter, an error causes DiskPart to exit with an error code.


删除 d:\驱动器,请键入:To remove the d:\ drive, type:

remove letter=d

其他参考Additional References