Disk Partition CMD

Overview of disk partition cmd

Cmd, the abbreviation for command, is a Microsoft Windows command that opens the Windows command line window.
Notes: Windows 95 & 98 users can only enter the command line by entering command; other Windows users can enter command or cmd to use.

How to open Windows cmd

Method 1: You can input cmd in the Start Menu search bar to open the Windows Command Prompt.
Method 2: You can press Win+R to open the Run box, type cmd, and press Enter.

What is Diskpart

After open cmd, you need to type ‘diskpart’ for disk partitioning. Diskpart is a command-line utility in Windows 10, which enables you to operate disk partition by using Diskpart command prompt, including create, merge, extend, shrink, format, delete, wipe disk partition, and other features.

Next, we will provide more information about how to use disk partition cmd in Windows 11/10. If you like this page, don’t hesitate to click the buttons below to share it with more people!

How to use disk partition cmd in Windows 11/10

Steps to create a partition in Windows 11/10 using command prompt.
Warning: Do not use the Diskpart until a full backup.

Step 1: You can use the two methods mentioned above to open the command prompt or Run window.
Step 2: Enter Diskpart
Steps about essential partition functions are as follows:

  • Create a partition using Diskpart

1. At the Diskpart prompt, type: List Disk 
2. Input: Select Disk * (* represents the disk number)
3. Type: Create partition primary size=*(* means the partition size.) 
4. Input: Assign letter=* (* represents Choose a drive letter not already being used.)
5. Type: Exit (Exit is the Esc on the top left of the keyboard.)

 

  • Extending a partition using Diskpart

Note: If you try it or any other method, make sure you have a full backup.
1. Verify that contiguous free space is available on the same drive and that free space is next to the partition you intend on extending, with no partitions in between.
2. Type: Select Disk * (Selects the disk.)
3. Type: Select Volume *(Selects the volume.)
4. Type: Extend Size=*
5. Type: Exit

  • Deleting a partition using Diskpart

Note: You cannot delete an active system or boot partition or a partition with a dynamic page file.
1. Input: Diskpart.exe
2. Select disk *
3. Select Partition *
4. Delete partition
5. Exit

  • Wiping a disk using Diskpart

This operation deletes all data on the disk.
1. Type: Select disk *
2. Type: Clean all(The CLEAN ALL command removes all partition and volume information from the hard drive being focused on.)
3. Exit

FAQ

1. How do I use diskpart command in Windows 11/10?
-Boot into Windows 10
-Press the Windows key and C to open the charm bar.
-Type cmd
-Click Command Prompt
-When Command Prompt opens, type diskpart
-Press Enter

2. How to assign drive letter via Diskpart?
–Type “assign letter=F” (F can be replaced with another letter that has not been used yet).
–And then, you will receive a message that says: DiskPart successfully assigned the drive letter or mount point.

3. How to shrink partition via Diskpart
Type shrink directly will automatically shrink the partition by Windows, and you can also type shrink desired=*** to define your partition size.
(Such as: Type “shrink desired=10240”. And then, you will receive a message that says: DiskPart successfully shrunk the volume by 10GB.)
Note: You can reduce the size of a volume only if it is formatted using the NTFS file system.

4. How to mark a partition as active via Diskpart?
–Type active.
–And then, you will receive a message that says: DiskPart marked the current separation as active.

5. How to clean Disk/convert a disk to GPT/ convert a disk to MBR?
-Type: list disk.
-Type: select disk 1.
-Type: clean.
-Type: convert gpt or convert mbr.