Name
DiskPart —
\windows\system32\diskpart.exe
Synopsis
Prepare and partition a hard disk.
To Open
Command Prompt →
diskpart
Description
DiskPart is a full-featured program used to prepare hard disks and,
optionally, divide them into two or more partitions.
It’s a command-line program and has no interface to
speak of. When you start DiskPart, you’ll see a
simple prompt: DISKPART>. Type
help and press Enter to view a list of all the
available commands:
-
add Add a mirror to a simple volume (Windows XP Server / Advanced Server only).
-
active Activate the current basic partition so that it can be used as a boot disk; using it is not necessary if there’s only one partition in the volume.
-
assign Assign a drive letter or mount point to the selected volume. Note that it may be easier to use the Disk Management tool; see the Microsoft Management Console for details.
-
break Break a mirror set (undoes the
addcommand).-
clean Clear the configuration information, or all information, off the disk; this effectively erases the disk.
-
convert Convert between different disk formats; most users will never need this command.
-
create Create a volume or partition; this is the first step in preparing a hard disk.
-
delete Delete an object (undo the
createcommand).-
detail Display details about an disk, partition, or volume. Note that you’ll need to use
selectfirst.-
exit Exit DiskPart (Ctrl-C also works).
-
extend Extend a volume.
-
import Import a disk group.
-
list Print out a list of object; similar to
detail ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access