The diskpart utility (available in Windows 2000, XP, Vista, 7, 8, 8.1 and 10) can be used to create or delete partitions on your PC.

Advertisements

The utility allows you to:

  • Partition
  • Remove partitions
  • Remove formatting
  • Assign and remove drive letters and mount points
  • Convert disks from basic to dynamic
  • Create and extend volumes

Most commands that you can perform in Disk Management are available with diskpart. Because it’s a command line utility, you need to open Command Prompt and type diskpart.

On Windows Vista, 7, 8 and 10 systems, you can type diskpart at Run, click OK or press Enter and Command Prompt will automatically open with diskpart loaded.

When the utility is loaded, you will notice the version installed on your computer:

Microsoft DiskPart version 10.0.19041.1 
Copyright (C) Microsoft Corporation. On Computer: YOUR_COMPUTER
Advertisements

Commands and parameters

The diskpart tool has the following commands and parameters available:

  1. select can set the focus on a specific target
  2. select disk – use this command to set the focus on a specific disk
  3. select partition – use the select partition command to set the focus on a specific partition
  4. select volume – use this command to set the focus on a specific volume
  5. detail disk will deliver information about the current disk
  6. detail partition will deliver information about the current partition
  7. detail volume will deliver information about the current volume
  8. list disk – use list disk to get summary information about the available disks on your computer
  9. list partition – use this command to get information about each partition available on a specific disk
  10. list volume – use list volume to get information about each volume available on the computer
  11. active – use the active command to set the focus on the current partition to be active
  12. assign – use assign to assign a letter or a mount point to the current active partition
  13. create partition primary size=SIZE_IN_MB – use this command to create a new primary partition. The SIZE_IN_MB is the size of the partition you want to create, in MB.
  14. create partition extended size=SIZE_IN_MB – use this command to create a new extended partition. The SIZE_IN_MB is the size of the partition you want to create, in MB.
  15. create partition logical size=SIZE_IN_MB – use this command to create a new logical partition. The SIZE_IN_MB is the size of the partition you want to create, in MB.
  16. delete partition will delete the current active partition
  17. extend will extend the current volume
  18. remove will remove a letter or a mount point from the current active partition
  19. active – use this to set the current volume as active
  20. add disk – use this command to add a mirror to the current active volume
  21. break disk – use this command to break the mirror added
  22. create volume stripe – use this to create a stripe set volume on a specified disk
  23. create volume raid – use this command to create a Raid-5 volume on a specified disk
  24. delete disk – use this command to delete a missing dynamic disk
  25. delete partition – use this command to delete the current active partition
  26. extend disk – use this command to extend the current volume
  27. import can be used to import disks from a foreigh disk group
  28. online can be used to bring a disk or a volume online that was previously offline
  29. remove can be used to remove a letter or a mount point from the current active volume
  30. retain is used to prepare a volume to be used as a boot or system volume
  31. convert mbr will set the partition style of the current disk to MBR
  32. convert gpt will set the partition style to GPT
  33. convert dynamic will change a basic disk into a dynamic one
  34. convert basic will convert a dynamic disk (empty disk) into a basic disk
  35. exit will exit the utility
  36. clean will remove the partition or volume formatting from the current disk
  37. rescan can rescann the I/O buses and can discover new disks added to the computer
  38. help will display the list of all available commands
Advertisements

Leave a Reply