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 add command).

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 create command).

detail

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

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 ...

Get Windows XP in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.