Manage Hard Disk using Command Line
Diskpart can be used on both command prompt and PowerShell. But, you must well be understanding what you are doing when using Diskpart. It might happen much time which formatted the entire disk with one command. The last one was a Laptop of my friend with lots of memorial photos and videos. Fortunately, we had recovered all data successfully with data recovery software. But take too us much time.Manage Hard Disk using Command Line in Windows 10:
- Open command line or PowerShell.
- Run DiskPart as Administrator privilege.
- Clean Hard Disk with Command Line.
- Create Partition with Command.
- Format Hard Disk with Command.
- Delete Partition.
- Extend Partition with Command Line.
- Shrink Partition with Command.
- Press Windows+R to open the Run and type “diskpart” then press enter to run the DiskPart utility.
- Click Yes to User Account Control prompt.

1. Create Partition with Command
You may want to list installed hard disks of the system. Just type ‘list disk’ then press enter to display all connected hard disks of your PC. The List disk command only shows the normal hard disks on your computer. If your hard disk is corrupted, it’s not possible to display with DiskPart List Disk command.1. Type “List Disk” to view all hard disks.

For example, you want to select disk 1. Type “select disk 1” command and press enter. Now the disk one has chosen as the disk you want to manage it with the command line.

2. Clean a Partition Using DiskPart
Now clean the disk by ‘Clean’ command.- Type “clean” and press enter to clean disk with command.

3. Create a Partition with Command
To create a partition with command just type “Create partition primary size=40000″ and press enter. This command will create a 40 GB primary partition from disk 1. You can assign the size of your partition according to your hard disk capacity.1. Type “create part primary size=50000” then press enter.
Related Posts


4. How to Format Partition with Command?
- Type ‘format fs=ntfs quick’ to format the partition, and type ‘list vol’ to see the formatted partition with NTFS file system.

2. Just type “assign letter=f” and press enter. The F letter has assigned to volume 3. Now it appears as F local drive on File Explorer.

5. How to Delete a Partition with Command?
- To delete a partition or volume with command first select volume then type “delete partition.” Like screenshot.

6. How to Extend a Partition with Command?
The extended process is to add some more space to existing partition from the free space of a hard disk. To do this, just follow the screenshot.- List the volumes with “List vol” command.
- Type “extend size=10000” to add extra 10 GB to volume 3 from the free spaces of the hard disk.

6. How to Shrink a Partition with Command?
It is the best option for a newly purchased laptop that only has one drive on its hard disk. You can use DiskPart shrink command to shrink the extra free spaces of a drive. Shrink a volume is to create unallocated space from free spaces of an existing partition.- Type “List vol” to see all volumes.
- Just type “shrink desired=20000 minimum=10000” then press enter.

Finally, I hope this article helps you manage hard disk using command line easy. If you have any issue with disk management or DiskPart commands, please comment us.
No comments:
Post a Comment