June 17, 2002
Learn Windows XP Professional in 15 Minutes a Week: Getting to Know the Disk Management Tools
DiskPart
The command line tool DiskPart is also available in Windows XP Professional. DiskPart allows the administrator to handle disk administrative tasks from a command prompt.
You start your session at the command prompt by typing the following:
H:\Documents and Settings\JZANDRI>diskpart
Microsoft DiskPart version 1.0
Copyright (C) 1999-2001 Microsoft Corporation.
On computer: P42GHZ
DISKPART>
This will put you into the DiskPart program session. If you needed to get a little more information on DiskPart before starting your session and tried the standard <DRIVE LETTER>:\diskpart /?, this is all you would get:
H:\Documents and Settings\JZANDRI>diskpart /?
Microsoft DiskPart version 1.0
Copyright (C) 1999-2001 Microsoft Corporation.
On computer: P42GHZ
Microsoft DiskPart syntax:
diskpart [/s <script>] [/?]
/s <script> - Use a DiskPart script.
/? - Show this help screen.
However, if you started the program and then typed HELP, you'd get much more information:
H:\Documents and Settings\JZANDRI>diskpart
Microsoft DiskPart version 1.0
Copyright (C) 1999-2001 Microsoft Corporation.
On computer: P42GHZ
DISKPART> help
Microsoft DiskPart version 1.0
ADD - Add a mirror to a simple volume.
ACTIVE - Activates the current basic partition.
ASSIGN - Assign a drive letter or mount point to the selected volume.
BREAK - Break a mirror set.
CLEAN - Clear the configuration information, or all information, off the
disk.
CONVERT - Converts between different disk formats.
CREATE - Create a volume or partition.
DELETE - Delete an object.
DETAIL - Provide details about an object.
EXIT - Exit DiskPart
EXTEND - Extend a volume.
HELP - Prints a list of commands.
IMPORT - Imports a disk group.
LIST - Prints out a list of objects.
ONLINE - Online a disk that is currently marked as offline.
REM - Does nothing. Used to comment scripts.
REMOVE - Remove a drive letter or mount point assignment.
RESCAN - Rescan the computer looking for disks and volumes.
RETAIN - Place a retainer partition under a simple volume.
SELECT - Move the focus to an object.
DISKPART>
For the most part, this command line tool is highly effective when you are using any of the above commands via scripting. The only other time it is easy/necessary to use it is from the Recovery Console, as it is one of the commands available from the console.
[NOTES FROM THE FIELD] - Do not modify the structure of dynamic disks with the DiskPart command line tool because you might damage your partition table within the dynamic disk structure.
To exit the DiskPart program simply type EXIT at the program prompt.
The Diskpart Command Line Utility is available for download from Microsoft for Windows 2000 and is part of the Windows 2000 Resource Kit Tools as well. (It is included as part of Windows XP Professional.) As with any software available for use from any version of the Resource Kits or the download site, it is not supported under any Microsoft standard support program or service. In other words, you use it at your own peril.
Bookmarks