
The Windows Operating System is equipped with built-in Disk Management tools that offer a complete solution for managing hard disks on a computer. You can use it to shrink / decrease the volume, increase / increase the volume, create a new one and so on. The user interface is created using a series of DISKPART commands that work both in PowerShell and in the Command Prompt. This is especially useful when you need to run complex commands and work with virtual hard disks. The Diskpart utility has a list of commands you can use.
List of Diskpart Commands in Windows 10/11
active |
Tag partition disc with focus as active |
add |
Reflect simple volume with focus to disc determined |
assign |
Set drive letter or |
attach vdisk |
Install (sometimes called mount or surface) virtual hard disk (VHD) so that appear in computer host as local hard disk drive |
attributes |
Showing or arrange or delete disk attributes or |
automount |
Activate or deactivate |
break |
Break mirrored volume with |
clean |
Delete a number of and all partition or formatting volume from disc with focus |
compact vdisk |
Reduce size |
convert |
Convert volume table allocation files (FAT) and FAT32 to |
create |
Make partition |
delete |
Delete partition or volume |
detach vdisk |
Stop virtual hard disk (VHD) which chosen so that no appear as local hard disk drive in computer host |
details |
Showing information about disc, partition, volume or virtual hard disk (VHD) which chosen |
exit |
Go out from |
expand vdisk |
Expand virtual hard disk (VHD) to |
extend |
Expand volume or |
filesystems |
Showing information about filesystem volume moment |
format |
Format disc for |
gpt |
Set GPT attributes to partition with focus on a GUID Partition Table (GPT) disk base |
help |
Showing list order |
import |
Import group disk foreign to local computer group disk |
inactive |
Tag partition |
list |
Showing disk list, partition in disk, volume in disc, or virtual hard disk (VHD) |
merge vdisk |
Merge virtual hard disk (VHD) which different with VHD parent which in accordance |
offline |
Switch disc or online volume to offline status |
on line |
Switch disc or |
recover |
Refreshing status all disc in disk groups, try restore disc in disk group no valid and synchronize |
brake |
Provide method for add comment to script |
remove |
Delete drive letter or point mount from volume |
repair |
Repair RAID-5 volumes with focus with replace disk region fail/damaged with dynamic disk determined |
rescan |
Find disc new which possible has added to computer |
retain |
Prepare dynamic simple volume there is for used |
san |
Showing or set |
select |
Change focus to disc, partition, volume or virtual hard disk (VHD) |
set id |
Change field type partition for partition with focus |
shrink |
Reduce size |
uniqueid |
Showing or set |
Tips: You can resize partitions even if Disk Management fails using the DISKPART and FSUTIL command line tools for Disk Management.
How to Use Diskpart
Diskpart runs in its own space, so when you run the command, you won’t be able to use the usual commands but only the Diskpart command.
- Open Command Prompt or PowerShell with admin rights. For Command Prompt, search for it in the Start menu by typing cmd then right click to him and choose Run as Administrator. For PowerShell, press the key Win + X and select Windows PowerShell (Admin) or search in the Start menu for Windows 11.

- Once open, type diskpart and press Enter. You will see a console to switch from the regular Windows path to Diskpart.

Some Basic Commands for Using Diskpart
You can start with a few basic commands to understand how they work, but be careful if you choose to delete anything. It cannot be recovered.
- List Disk: Displays the number of connected hard drives or storage.
- Select Disk
: Selects a specific disk.
- List Partition: Displays a list of partitions for the selected disk.
- List Volume: Displays all partitions of all disks.

How to see list of Drives in Diskpart?
Once you are inside Diskpart, type Disk List and press Enter. This will list all connected storage, including hard drives, USB storage, SD cards or anything else connected to your PC.
How to wipe Volume or Partition?
Follow the steps below. Press Enter each time you enter the command below.
- Select Volume
How to Assign a Drive Letter to a Hidden Partition?
If a partition is visible in the Diskpart tool but is not available through File Explorer, then it’s because no drive letter has been assigned to it.
- Select Volume
How to Reduce Partition Size?
Before we go any further, please know that this is a very long process. Until the process is complete, the drive will be almost useless.
- Select Disk
- Volume List
- shrink desired=
It only works for NTFS file system.
How to wipe disk using Diskpart Clean command?
- Open the Diskpart command in the Command Prompt.
- Type disk list and press Enter.
- Select the disk you want to clean using the command select disk
.
- Type clean and press Enter.
Make sure not to use the clean all command. That will delete all partitions from the selected disk. The process will take about an hour, depending on the size of the disk, as it will perform a safe wipe.
So many tutorials this time. Hopefully this is useful and helps you understand the DISKPART command and how to use it on your Windows 10 Windows 11. Don’t forget to leave your comments below to share your thoughts and experiences in following this tutorial. Thank you and GBU. UNITED AGAINST COVID-19!!