Events
29 Apr, 14 - 30 Apr, 19
Join the ultimate Windows Server virtual event April 29-30 for deep-dive technical sessions and live Q&A with Microsoft engineers.
Sign up nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Removes a drive letter or mount point from the volume with focus. If the all parameter is used, all current drive letters and mount points are removed. 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. 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.
Note
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 |
---|---|
letter=<drive> |
The drive letter to remove. |
mount=<path> |
The mount point path to remove. |
all | Removes all current drive letters and mount points. |
noerr | For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code. |
To remove the d:\ drive, type:
remove letter=d
Events
29 Apr, 14 - 30 Apr, 19
Join the ultimate Windows Server virtual event April 29-30 for deep-dive technical sessions and live Q&A with Microsoft engineers.
Sign up now