Software & Apps Windows Diskpart Command (Recovery Console) How to Use the Diskpart Command in the Windows XP Recovery Console by Tim Fisher General Manager, VP, Lifewire.com Tim Fisher has 30+ years' professional technology support experience. He writes troubleshooting content and is the General Manager of Lifewire. our editorial process Facebook Twitter LinkedIn Tim Fisher Updated on May 21, 2019 Windows The Ultimate Laptop Buying Guide Tweet Share Email The diskpart command is a Recovery Console command used to create or delete partitions on hard drives. Diskpart Command Availability The diskpart command is available from within the Recovery Console in Windows 2000 and Windows XP. A diskpart command is also available from the Command Prompt and is used to start the DiskPart tool. Managing partitions is also possible without the use of a command from within any version of Windows using the Disk Management tool. Diskpart Command Syntax diskpart /add /add = The /add option will create a new partition on the specified hard drive. diskpart /delete /delete = This option will remove a specified partition on a specified hard drive. Diskpart Command Examples diskpart /add \Device\HardDisk0 5000 In the above example, the diskpart command creates a 5,000 MB partition on the hard drive located at \Device\HardDisk0. diskpart /delete \Device\HardDisk0\Partition1 In the above example, the diskpart command will remove the Partition1 partition located on the hard drive \Device\HardDisk0. diskpart /delete G: In the above example, the diskpart command will remove the partition currently assigned the drive letter G. Diskpart Related Commands The fixboot, fixmbr, and bootcfg commands are often used with the diskpart command.