Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

In this Itechguide, Victor teaches you how to use DISKPART to create a partition and assign a drive letter. The guide also covers steps to use DISKPART to delete a partition.

Option 1: Create a Partition and Assign a Drive Letter

DISKPART is one of the most useful CMD commands for System Administrators. This section covers steps to use this must-know tool to create a new partition and assign a drive letter to the partition.

Step 1: Open Command Prompt as an Administrator

To use DISKPART, you need to open Command Prompt as administrator. Here are the steps to run CMD as Administrator…

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Type command prompt in the search box. Then, from the search results, right-click Command Prompt and select Run as Administrator.
How to Use DISKPART to Create a Partition and Assign a Drive Letter.
  • When you receive a User Access Control (UAC) confirmation, requesting you to allow the “app to make changes to your PC”. On the UAC prompt, click Yes.
How to Use DISKPART to Create a Partition and Assign a Drive Letter.

Step 2: Create a Partition

After opening Command Prompt as administrator, use the steps below to create a partition.

Popular on Amazon
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400) | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
  • Easily store and access 2TB to content on the go with the Seagate Portable Drive, a USB external hard drive
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.
  • On the CMD Prompt, to open the DISKPART command prompt, type the command below and press enter.
DISKPART
  • The DISKPART CMD prompt will open.
How to Use DISKPART to Create a Partition
  • On the DISKPART prompt, use the LISK DISK command to list all available disks – type the command and press enter.
LIST DISK 
  • The LIST DISK command displays all the disks on your PC. The next step is to select the disk you want to use DISKPART to create a partition on.
Note the disk number for the disk you want to create a partition on. For this example, my disk number is 1. Note that this disk is currently Offline.
  • To select the disk, use the command below – enter the command and press enter.
SELECT DISK 1 
Change 1 to your disk # identified in the previous step.
  • The last command should return “Disk # selected successfully”
How to Use DISKPART to Create a Partition and Assign a Drive Letter.
  • If your disk is Offline, you need to take it Online. Use the command below.
ONLINE DISK
  • The command should return “DiskPart successfully onlined the selected disk”. To confirm that the disk is now online, run the LIST DISK command.
  • To be sure that your disk is still selected, run the SELECT DISK command again. Then, to see if there are any partitions on the selected disk, run the command below – this will list all available partitions on the selected disk.
LIST PARTITION 
  • If there are partitions on the disk, they will be displayed. Otherwise, the command will return “There are no partitions on this disk to show”.
  • To use DISKPART to create a partition, type the command below. Then, press enter. Before you press enter, read the notes below the command.
CREATE PARTITION PRIMARY SIZE=n

The above command will create a Primary partition. If you want to create an Extended partition, replace PRIMARY with EXTENDED. In the command, n is the size of the partition in Megabytes. To create a partition with all available disk space, DO NOT specify the SIZE parameter.

To read more about disk partitions, read this How-to-geek guide – Hard Disk Partitions Explained.

Also popular on Amazon
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
  • Easily store and access 5TB of content on the go with the Seagate portable drive, a USB external hard Drive
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.
  • Here is a real sample command – this DISKPART command creates a partition with all available spaces on the selected disk.
CREATE PARTITION PRIMARY
  • If DISKPART returns “DiskPart succeeded in creating the specified partition”, the partition was created. Otherwise, if it returns an error, read the error details and fix the problem.
  • To confirm that the partition was created, run the LIST PARTITION command again. The partition will now be listed!

Step 3: Assign a Drive Letter

After creating a partition, you need to assign a drive letter to the partition. Here are the steps…

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Still on the DISKPART prompt, type the command with the format below.
ASSIGN LETTER=N

N is your drive letter. The command below assigns letter D to the partition you created in the last section…

Also popular on Amazon
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
  • Easily store and access 1TB to content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop. Reformatting may be required for Mac
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.
ASSIGN LETTER=D
  • If the drive letter is not available, you will receive an error message – try another letter.
  • In the command shown in the image below, I used drive F and the drive letter was assigned successfully!
How to Use DISKPART to Assign a Drive Letter
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Option 2: Delete a Partition

If you can DISKPART to create a partition, you can also use DISKPART to delete a partition. Here are the steps…

DISKPART  
  • The DISKPART prompt will open.
How to Use DISKPART to Delete a Partition
  • On the DISKPART CMD prompt, type the LIST DISK command. Then, press enter.
LIST DISK 
  • The LIST DISK command lists all the disks on your PC. The next step is to select the disk you want DISKPART to delete a partition from.
In this example, I want to delete a partition from Disk 1.
How to Use DISKPART to Delete a Partition
  • To select the disk, use the SELECT DISK command. Here is an example command that selects disk 1.
SELECT DISK 1

Replace 1 with your disk #. The next step is to list partitions on the select disk.

Also popular on Amazon
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
  • Easily store and access 4TB of content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.
  • Use the command below to list available partitions on the disk.
LIST PARTITION
  • Then, select the partition you want to delete with this command…
SELECT PARTITION 1

Replace 1 with your partition #

  • Finally, to use DISKPART to delete a partition, type the command below and press enter.
DELETE PARTITION
  • To see how to run the commands above, see the image below…

As you can see, it is very easy to use DISKPART to create or delete a partition!

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

I hope you found this Itechguide helpful. If you were able to use DISKPART to create or delete a partition by following this guide, click on “Yes” beside the “Was this page helpful” question below.

Also popular on Amazon
Sale
UnionSine 500GB Ultra Slim Portable External Hard Drive HDD-USB 3.0 | for PC, Mac, Laptop, PS4, Xbox one, Xbox 360-(Black)
  • [Upgraded Version] - This external hard drive features a mirrored logo stripe combined with a striped anti-slip design, and the rounded corners of the casing make it easier to grip. The stripes also have a heat dissipation function, ensuring stable and fast data transfer.
  • 【Ultra-thin and quiet】 - The motherboard adopts JMicron 578 noise-free solution, giving you a quiet working environment. Lightweight and portable size designed to fit in your pocket for easy portability.
  • 【Ultra-Fast Data Transfers】 - Pairing this external hard drive with JMicron 578 solution USB 3.0 and USB 2.0 interfaces enables blazing-fast data transfer. It boasts theoretical read speeds of up to 125MB/s and write speeds of up to 103MB/s.
  • 【Plug and Play】 - With no software to install, just plug it in and the drive is ready to use.The hard disk chip is wrapped with an aluminum anti-interference layer to increase heat dissipation and protect data.
  • 【What You Get】 - 1 x Portable Hard Drive, 1 x USB 3.0 Cable, 1 x User Manual, Gift-type shell packaging ,Three-year manufacturer's warranty and free technical support services.

You may also express your thoughts and opinions by using the “Leave a Comment” form at the bottom of this page.

Finally, for more Command Prompt Itechguides, visit our Windows Command Prompt page.

Quick Recap

Bestseller No. 1
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400) | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400) | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$129.99
Bestseller No. 2
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$219.55
Bestseller No. 3
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$119.80
Bestseller No. 4
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$189.99

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.