• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Prepare and partition ahard disk.

To Open

Command Prompt diskpart


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 a mirror to a simple volume (Windows XP Server / Advanced Server only).


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 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 a mirror set (undoes the add command).


Clear the configuration information, or all information, off the disk; this effectively erases the disk.


Convert between different disk formats; most users will never need this command.


Create a volume or partition; this is the first step in preparing a hard disk.


Delete an object (undo the create command).


Display details about an disk, partition, or volume. Note that you'll need to use select first.


Exit DiskPart (Ctrl-C also works).


Extend a volume.


Import a disk group.


Print out a list of object; similar to detail.


Change the status of the disk from offline to online.


Remove a drive letter or mount point assignment (undo the assign command). Note that it may be easier to use the Disk Management tool; see Microsoft Management Console for details.


Rescan the computer looking for disks and volumes.


Place a retainer partition under a simple volume.


Choose a disk, partition, or volume to view or modify. Even if you have only one disk or partition, you'll still need to select the object before carrying out any other commands. Use list to obtain object numbers for use with select, and then use detail to get more information.

Each of these commands (with the exception of exit) has one or more subcommands. For example, if you simply type detail at the prompt, you'll get a list of the subcommands for use with the list command: disk, partition, and volume. So, to display a list of all the disk volumes on the system, you would type:

list volume

and you'll get a report that looks look something like this:

Volume ##  Ltr Label       Fs     Type       Size     Status   Info
---------  --- ----------  -----  ---------  -------  -------  ----
Volume 0   D   XPPCORP_EN  CDFS   CD-ROM      492 MB
Volume 1   C   Hard Disk   NTFS   Partition    28 GB  Healthy  System

From the report, is clear that drive C: is Volume 1; the next step is to select the volume, like this:

select volume 1

Subsequent commands will then apply to the currently selected volume.


  • Disk partitioning is tricky business and unless you're preparing a new drive, you'll probably never need to use DiskPart. If you need to repartition a drive that you're currently using, DiskPart is not the way to go, as it will erase any drive you attempt to repartition. A better choice is to use PartitionMagic by PowerQuest (http://www.powerquest.com/), which allows you to add, remove, and resize partitions without destroying the data they contain.

  • DiskPart replaces the Fdisk utility found in Windows 9x/Me.

See Also

Microsoft Management Console

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint