What is DiskPart?

How to keep your data safe from unstable software

No matter how diligent you are when it comes to computer maintenance and patch management, things can and will go wrong, particularly when it comes to your hard drive.

Fortunately, there are ways to preempt errors or failures, allowing you to perform a great deal of damage limitation before you're even aware of an issue. One such way is to partition your hard disk, separating your operating system and applications from your data. This means that in the event that software encounters a critical error, your files are still recoverable.

Advertisement - Article continues below

Unfortunately, this approach is not an entirely failsafe way to prevent data loss, but it is considered best practice to keep your business-critical data away from potentially vulnerable software in addition to keeping regular backups.

Speaking of backups, partitioning actually makes this process far easier to manage. For example, if you need to reinstall Windows for any reason, your data partition will remain untouched and can be accessed as normal once the installation finishes.

When it comes to partitioning your disk, you have a number of options. Windows comes with its own built-in Disk Management utility which you can use to quickly partition a disk. However, there's also the DiskPart command tool, which offers some extra management options for creating more sophisticated partitions.

What is DiskPart?

DiskPart is a disk partition utility that operates using the command line, designed to be used with all versions of Windows and Windows Server - as long as the software is no older than Windows XP and Windows Server 2003.

Advertisement - Article continues below
Advertisement - Article continues below

The tool essentially allows for more granular control of disk management, including the cleaning and formatting of USB flash drives, and the creation of partitions and assignment of disk drive letters.

Unlike Microsoft's Disk Management tool, DiskPart can be run without Windows starting up and offers explicit control over hard drive volumes and partitions, including surfacing hidden recovery partitions. This makes it a powerful tool and not one to be used without a degree of caution, as any formatting it does on a hard drive cannot be undone once actioned.

DiskPart's power also means it is a useful tool for fixing problems such as data corruption on USB flash drives and SD cards which a simple formatting in Windows cannot fix.

How to use DiskPart

Backing up your data is the most important first step to take into account before proceeding to use DiskPart, or for that matter, any other function that affects the core of your PC. You should only begin the procedure once you’ve established a backup of the data on your hard drive. Users will require admin access to create a partition on the hard drive, which means you may need to recruit the help of your IT team if this proves a blocker. To begin, open the Command Prompt window either by entering ‘command prompt’ into Windows’ search bar or press the Windows key in combination with ‘X’. Click ‘diskpart’ and then press the enter key, as you wait for the tool to open in a new window so you can identify which storage drive you want to partition. Then, enter ‘list disk’ to pull up a list of drives on your machine. 

Related Resource

Flash storage fuels IT transformation

Discover the quantified impacts of organisational flash storage use

Download now

Most machines will only have one storage drive, so all you’ll need to do is pick the first and only one that shows up. If you’re confused as to which drive you should use, and you are presented with a range, you’ll have to look into which disk is the best to pick at the risk of partitioning the wrong drive. 

Advertisement - Article continues below

When you have found the disk, choose 'select disk' followed by the corresponding number to select the correct one. For example, if the correct disk is the second in the list, type in 'select disk 2' to highlight it and start the partition process.

Again, you will use commands to carry out actions. The 'Extend' command will extend a disk's partition to any unused volume left on the hard drive, while the 'Shrink' command will do the opposite. You can also use 'Clear' to remove all information from a disk, or 'Create' to make a new partition.

When creating a new partition in a drive you will need to ensure you make it active and assign a letter to it using listed commands. To get these commands you can refer to an online guide or can simply type any letter after the 'DISKPART>' line and hit enter to be served up with a selection of compatible commands.

Advertisement - Article continues below

It is worth getting familiar with the command prompts before diving into DiskPart, and the utility is best reserved for IT administrators and people familiar with in-depth hard drive formatting. For those willing to delve into the command-line interface DiskPart should prove to be a powerful hard drive management tool native to Windows.


Most Popular

application programming interface (API)

Apple buys Dark Sky weather app and leaves Android users in the cold

1 Apr 2020
Mobile Phones

Microsoft’s patent design reveals a mobile device with a third screen

6 Apr 2020
video conferencing

Zoom CEO admits company "moved too fast" as privacy issues mount

6 Apr 2020