- Buying Guides

Complete Guides by How-To Geek
Our latest product roundups, reader favorites, more from how-to geek, latest geek news, latest reviews, across lifesavvy media.
Join 425,000 subscribers and get a daily digest of news, geek trivia, and our feature articles.
By submitting your email, you agree to the Terms of Use and Privacy Policy .
How to Use the Diskpart Utility to Assign and Remove Drive Letters
Lowell is the founder and CEO of How-To Geek. He’s been running the show since creating the site back in 2006. Over the last decade, Lowell has personally written more than 1000 articles which have been viewed by over 250 million people. Prior to starting How-To Geek, Lowell spent 15 years working in IT doing consulting, cybersecurity, database management, and programming work. Read more...

The Disk Management tool in Windows gives you an easy-to-use graphical interface to dealing with partitions and drive letters , but what if you want to just quickly change a drive letter on the command prompt? The diskpart utility makes it easy.
You’ll need to start by opening an administrator mode command prompt — type cmd into the search box, and then right-click and choose Run as administrator, or use the CTRL + SHIFT + ENTER keyboard shortcut.
Once there, run the diskpart command, and then type in the following to list out the volumes on your system.
list volume
You’ll want to note the volume number next to the drive that you want to change the letter of. In our case, that number is 3.
Now we’ll use the select volume command to tell diskpart to make changes to that volume. If your drive number is different, you’ll want to replace the 3 with the number in your configuration.
select volume 3
You should see a message that the volume is now selected.
At this point you can easily assign a new drive letter. Just type in this command, substituting R for the drive letter you’d like to use:
assign letter=R
Make sure to hit enter once you’re done, of course.
Once you’ve made that change, your drive should show up again as a new device, and be available for browsing immediately.
If you want to unassign a drive letter in order to hide the drive, you can also use the remove letter command in the same way. We wouldn’t necessarily advise doing this, of course.
Don’t bother trying to change your C: drive, because that’s not going to work.
- › How to Remove Write Protection on Windows 10
- › Amazon Won’t Let You Buy Kindle or Print Magazines Anymore
- › 8 Fixes for a Second Monitor Not Detected on Windows
- › Controller vs. Mouse and Keyboard: Which Is Better?
- › The Best VPN Services for Gaming in 2023
- › This Anker Battery Is Under Recall for Fire Risk
- › 15 Mac Apps You Should Be Using Everyday
- 100+ Years of Women In Tech
- The Tribal Digital Divide
Diskpart Command
Use the 'diskpart' command to manage hard drive partitions.
Tim Fisher has more than 30 years' of professional technology experience. He's been writing about tech for more than two decades and serves as the SVP and General Manager of Lifewire.
:max_bytes(150000):strip_icc():format(webp)/tim-fisher-5820c8345f9b581c0b5a63cf.jpg)
- Emporia State University
In This Article
Jump to a Section
- Availability
Related Commands
The diskpart Command Prompt command is used to create or delete partitions on hard drives .
Diskpart Command Availability
The diskpart command is available from within the Command Prompt in Windows operating systems, including Windows 11, 10, 8, etc.
You can also access this command from the Recovery Console in Windows 2000 and Windows XP.
Managing partitions is also possible without the use of a command from within any version of Windows using the Disk Management tool, or free disk partition software .
Diskpart Command Syntax
diskpart < parameter >
The availability of certain diskpart command switches and other syntax may differ from operating system to operating system. See How to Read Command Syntax if you're not sure how to read the syntax as it's described in this table.
Diskpart Command Examples
Here are some examples showing how the diskpart command can be used:
Create 5 GB Partition
In the above example, the diskpart command creates a 5,000 MB partition on the hard drive located at \Device\HardDisk0 .
Delete Partition by Name
For this one, the diskpart command will remove the Partition1 partition located on the hard drive \Device\HardDisk0 .
Delete Partition by Letter
This command will remove the partition currently assigned the drive letter G .
Select a Disk
Finally, in this multipart command, diskpart is being used to select a particular disk, disk 1 in this example, so we can remove the readonly attribute that's been set on it.
The fixboot , fixmbr , and bootcfg commands are often used with the diskpart command.
Get the Latest Tech News Delivered Every Day
- Expand Command
- AOMEI Partition Assistant Standard Edition v9.15
- Help Command
- Disk Management
- Attrib Command (Examples, Options, Switches, and More)
- Dir Command
- Fixboot Command (Recovery Console)
- What Is a Disk Signature and Why Is It Necessary?
- Rename Command
- Systemroot Command (Recovery Console)
- Format Command
- 35 Best Free Data Destruction Software Programs
- Fixmbr Command (Recovery Console)
- How to Read Command Syntax
- Copy Command
- What Is a Partition?
By clicking “Accept All Cookies”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts.

- Partition Windows 10
Everything About DiskPart Commands in Windows 10
DiskPart is a command-line utility in Windows 10/11, enabling you to perform disk partition operations with commands. Learn how to use DiskPart commands with typical examples here.

What is DiskPart?
DiskPart, replacing its predecessor - fdisk, is a command-line utility that provides the ability to manage disks, partitions or volumes in your computer running all versions of the operating system since Windows 2000, also including the latest Windows 10. Users can input DiskPart commands directly to organize hard disk partitions or create a text file script to perform multiple commands. Most disk partition operations that you can perform in Disk Management tool are integrated into DiskPart.
How to open DiskPart in Windows 10/11?
You will need to launch Windows 10/11 DiskPart with Administrator permission. One way is to type "diskpart" in the Search box, and then when diskpart appears in the search results, right-click it and select "Run as administrator". The other way is to press "Windows logo + R" keys and type "diskpart" in the box, and then click "OK".

Common DiskPart Windows 10/11 commands (examples study)
Before you can use DiskPart commands in Windows 10, you must first list, and then select an object to give it focus. When an object has been focused, any DiskPart commands that you type will act on that object.
At the DISKPART> prompt, type "list disk" to display all the disks in your computer. Each one will have a specific disk number, starting with 0. An asterisk (*) under GPT row means the disk is of GPT partition style. Unless there is only one disk, you will have to tell DiskPart which disk to manage by using "select disk n" command to give it focus. n represents the number of the disk.

At the DISKPART> prompt, type "list volume" to display all the volumes on all disks. Each one will have a specific volume number, starting with 0. To tell DiskPart which volume to manage, you need to type "select volume n" to give it focus. n can be the number of the volume or the drive letter of the volume if has.

To view what DiskPart can for you, just type help to see a list of commands.

Next, we will take some of the most common commands that Diskpart uses as examples for you to get a further understanding.
Section 1. Most common Diskpart commands on volume in Windows 10/11
Because when selecting a volume, the focus remains on it until you select a different volume, “select volume” command may not be used in each operation. Besides, the examples are performed one after one and the effect of the previous operation will be viewed in the next operation. If you only need to perform one of the operations, you need to select the volume before using the corresponding command.
➤ Note: Each time you type a command, you need to press "Enter" key to apply it.
1. Delete Volume
2. Create Partition
3. Format Partition
4. Assign Drive Letter
5. Extend Partition
6. Shrink Partition
7. Mark Partition as Active
To delete a volume, please refer to the following command:
▪ list volume
▪ select volume 6 (here take F: drive for example).
▪ delete volume
And then, you will receive a message says: DiskPart successfully deleted the volume.
Note: You cannot delete the system volume, boot volume, or any volume that contains the active paging file or crash dump.

To create a partition, please refer to the following command:
▪ create partition primary size=102400
And then, you will receive a message says: DiskPart succeeded in creating the specified partition.

The above command means to create a 102400MB (100GB) primary partition. To create other types of partition, you just need to replace primary with one of the followings:

➧Note: To create a partition, there must be unallocated space on the disk.
Type list volume command, you will find the new created partition is RAW, which means you must format partition before you can use it. To format a partition, please refer to the following command:
▪ format fs=ntfs label="Windows 7" quick
And then, you will receive a message says: DiskPart successfully formatted the volume.
The above command means to perform a quick format on the partition. It will be formatted with NTFS file system and labeled as Windows 7. To create other file system partition like FAT, FAT32, you just need to replace ntfs with fat or fat32. The label can be any name as you like.

➧Note: DiskPart cannot format 32GB+ partition to FAT32. To format a large hard drive to FAT32 , you have to turn to a third-party partition manager.
A partition without a drive letter will be hidden under "File Explorer". To assign a drive letter to an existing partition, please refer to the following command:
▪ assign letter=F (F can be replaced with another letter that has not been used yet).
And then, you will receive a message says: DiskPart successfully assigned the drive letter or mount point.

To extend a partition, please refer to the following command:
▪ extend size=20480
And then, you will receive a message says: DiskPart successfully extended the volume.
The above command means to add 20480MB (20GB) to the volume 6. If no size is given, all of the contiguous unallocated space on its right side will be added.

➧Note: To extend a partition, there must be contiguous unallocated space on its right side.
To shrink a partition, please refer to the following command:
▪ shrink desired=10240
And then, you will receive a message 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.
To mark a partition as active, please refer to the following command:
And then, you will receive a message says: DiskPart marked the current partition as active.

Section 2. Most Common Commands on Disk in Windows 10/11
The most common diskpart commands used on the disk should be the MBR and GPT conversion. To delete all partitions or volumes on a disk and convert the disk between MBR and GPT, please refer to the following command:
▪ list disk
▪ select disk 1
▪ "convert gpt" or "convert mbr".

Free alternative to Windows 10/11 DiskPart Utility
As DiskPart alternative, AOMEI Partition Assistant Standard is a free partition manager software and disk management tool, which provides more features than DiskPart. It not only supports Windows 10, but also supports Windows 11/8.1/8, Windows 7, Vista, and XP. You can also resize the BitLocker partition when it is running out of space. With a user-friendly interface, it is very easy to use.
To perform an operation on a partition, you just need to right-click on it. The operations supported by AOMEI Partition Assistant Standard are as below:

The operations of disk management and step-by-step wizards are as below:

DiskPart in Windows 10/11 can meet the basic requirement of most users. And the free AOMEI Partition Assistant is more advanced than it and provides more amazing features. For example, it can extend/shrink both FAT32 and NTFS partition. For extending a partition, its “ Merge partition ” allows users to add non-adjacent unallocated space into the target partition. It is able to format large partition (2TB at most) to FAT32 file system. For partition style conversion, it can convert data disk between MBR and GPT without deleting partitions.
You can download this freeware and have a try. To get more advanced features, such as converting dynamic disk into basic without losing data, recovering lost partition, you can upgrade AOMEI Partition Assistant Standard to Professional version.
Free Partition Manager

- Resize and Move Partition
- System/Disk Clone
- Convert MBR/GPT Disk
- Check & Fix Disk Errors

Download.com Rating

Still Need Help?
Have your problem been solved? If not, please input query in the search box below.

How to Use DiskPart Utility in Windows
Format, resize, extend and manage your drives
The Disk Management Tool is a useful, effective tool for managing your Windows disks and partitions, but it isn’t as powerful to use as Diskpart. This command-line tool lets you delete, create and modify partitions on any hard drives or USB storage your PC can detect.
We’d recommend using the Disk Management Tool for most situations, but if Windows isn’t starting up properly, or if you prefer to use the PowerShell terminal , Diskpart is the perfect alternative. Here are some of the more common Diskpart commands to help you learn how to use Diskpart effectively.

How To Use Diskpart
If you want to use Diskpart, you need to open up a Windows command line or PowerShell terminal. Diskpart is a destructive tool, so you’ll need to open a terminal window with the right administrative privileges.
- To open Diskpart in Windows, right-click your Windows Start menu button and click Windows PowerShell (Admin) .

- In your admin-level PowerShell terminal (or similar Windows command line), type diskpart and hit enter.

- The Diskpart tool will launch within the window, ready for you to use. Type exit at the “DISKPART>” prompt and hit enter once you’ve finished using it.
- Diskpart is also available for users booting into the Windows Recovery Environment, available when you boot your PC using the Advanced Startup mode in your Settings > Windows Update & Security > Recovery menu.
- Click Restart Now to boot to WinRE.

We’ll explore some of the most common Diskpart commands in this article, but if you want to quickly see the full list of available Diskpart commands, type help at the “DISKPART>” prompt and hit enter.

Listing Existing Hard Drives, Volumes & Partitions
Once Diskpart is open, the first thing you should do is check the current layout of your hard drives and attached storage.
- At the “DISKPART>” prompt, type list disk and hit enter. This will list all of the available storage drives (including hard drives, USB storage, SD cards, etc.) that your PC can currently detect.

- Starting with the number zero, Diskpart will list any detected disks. You’ll need to remember the disk number (for instance, “0” for your Windows hard drive) to use with future Diskpart commands.
- Along with your list of disks, you can also ask Diskpart for a list of detected volumes. At the “DISKPART>” prompt, type list volume .

- Diskpart can also let you list individual hard drive partitions (some of which may match the volumes listed with the “list volume” command). You’ll need to select a hard disk first with the list disk command.
- At the “DISKPART>” prompt, type select disk followed by the disk number (for instance, select disk 0 ). Diskpart will confirm that the disk is selected at this point.
- Once a disk is selected, type list partition . This will list the current partitions on your drive. You’ll be able to delete or modify these partitions from here, using the partition number in a later Diskpart command.

Deleting a Hard Drive Partition Or Volume Using Diskpart
A hard drive (disk) is separated into partitions, which are often the same as listed volumes. If your hard drive is separated into several partitions or volumes, and you wish to delete one, you can do that using Diskpart commands.
- Select your hard drive using select disk.
- At the “DISKPART>” prompt, type list partition , then select partition # , replacing # with your partition number.

- Once a partition is selected, type delete partition . Diskpart will confirm whether or not the partition has been deleted afterward.
- You can also delete disk volumes directly if you’d prefer. Type list volume , locate your chosen volume number, then type select volume # , replacing # with your volume number.

- Type delete volume to delete the volume completely. Diskpart will confirm if the command was successful or not afterward.
Wiping a Hard Drive Completely Using Diskpart Clean
Rather than removing individual volumes or partitions on a drive, you can wipe a hard drive completely using the Diskpart clean command. You can also use this command if you’re looking to wipe a USB flash drive, ready for formatting.
You won’t be able to do this on your system drive (nor would you want to!) unless you’re using Diskpart on a Windows installation
- At the “DISKPART>” prompt, select the disk you wish to wipe by typing select disk # , replacing # with your disk number. If you don’t know your disk number, type list disk first.

- If you’re sure you want to wipe the disk completely (deleting all drive volumes/partitions), then type clean and hit enter. You won’t be asked for confirmation, so be sure you wish to do this before you begin.

- Diskpart will confirm that the drive has been “cleaned”, ready for new partitions to be created.
Creating & Formatting New Hard Drive Partitions
With a “clean” drive, you’re ready to create a partition in the free space using the Diskpart create partition command. You can then format that new partition with a Windows-friendly file system like NTFS or FAT32 using the Diskpart format command.
- Start by selecting your chosen disk with select disk #, replacing # with your disk number (and using list disk to find your disk number, if you don’t know.)
- With your disk selected, type create partition primary to create a partition using the entire space on that drive.
- If you want to create a partition to take up only some of the free space (letting you create more than one partition), type create partition primary size=X instead, replacing X with the partition size, measured in megabytes (for example, size=1024 for 1GB of space).

- Type list partition to make sure that your new partition is listed, then type select partition 1 to select it. Mark the partition as active by typing active at the “DISKPART>” prompt. This is necessary if you want to use it as a bootable drive.

- To quickly format the drive with the NTFS file system, type format fs=NTFS label=Y quick. You can replace Y with any label you’d prefer to use.

- Once formatted, Windows will likely assign a drive letter automatically. If it doesn’t, type assign letter Z , replacing Z with a free drive letter.

Extend a Hard Drive Volume
If you have an existing hard drive volume that doesn’t take up all of the free space on a drive, and you wish to enlarge it, Diskpart commands allow you to do that.
- Type list volume to list all the available volumes on your PC, then type select volume # , replacing # with the volume you’re looking to extend.
- Type extend to expand it to the maximum size available. Diskpart will confirm whether or not the extend command has worked correctly. Confirm the size of the volume has increased by typing list volume for a second time afterward.

Diskpart has other options available, as the help command briefly explains. If you need further information on how to use Diskpart, Microsoft has further Diskpart support information available.
Ben Stockton is a freelance technology writer based in the United Kingdom. In a past life, Ben was a college lecturer in the UK, training teens and adults. Since leaving the classroom, Ben has taken his teaching experience and applied it to writing tech how-to guides and tutorials, specialising in Linux, Windows, and Android. He has a degree in History and a postgraduate qualification in Computing. Read Ben's Full Bio
Read More Posts:

Subscribe to Help Desk Geek.
Join 30,000+ others who get daily tips, tricks and shortcuts delivered straight to their inbox.
Thanks for subscribing!
We will never spam you, unsubscribe at any time.
- Windows Server OS and management

.shock - Fotolia
Using Diskpart to create, delete, clean or extend disk partitions
The diskpart is one of the oldest tools in the Windows operating system that handles a wide range of disk management jobs, such as assigning drive letters and deleting partitions.
- SearchWindowsServer staff
For basic disk operations on Windows systems, administrators can use diskpart , a command-line utility that remains useful for many different drive-related jobs more than 20 years after it was released.
Microsoft included the free disk management tool in Windows starting in 1999 with the Windows 2000 operating system. Diskpart scans for newly added disks, but it can also create, delete and resize drive partitions , and assign or reassign drive letters. Diskpart also works with drive volumes, virtual hard disks and removable media such as USB flash drives.
Microsoft continues to develop diskpart, and the latest version of the utility features 38 commands. To use diskpart, you list the objects, such as disks or partitions, and then select the object to change it.

Using diskpart requires understanding data storage terminology
Diskpart use requires a basic understanding of Windows disk terminology . A basic disk is a storage device, such as hard drives, solid-state drives and USB flash drives, which you format with a Windows file system .
A basic disk can hold one or several partitions. A partition is a logical structure confined to a single disk.
A volume is a construct of the operating system that consists of one or more partitions that can span one or more disks.
Using diskpart
You should be careful when using diskpart because there is no undo function if you select the wrong object. Also, once a command is entered, even a destructive one, diskpart does not ask for confirmation before it runs. For example, if you perform an errant diskpart delete partition operation, you must use another utility, such as third-party disk management program, to recover the data or use a backup image to restore the drive.
Follow these tips to avoid issues when using diskpart:
- Do not use diskpart until you back up the disk you plan to modify.
- Exercise caution when using diskpart on systems that use dynamic disks, an older technology with advanced features that gave administrators a way to make a volume that spanned several disks.
- Check with your hardware vendor before using diskpart.
Creating a partition using diskpart
Using diskpart to partition your disk can help increase the I/O performance of hard disks newly added to a RAID array . The documentation for many server applications, such as Exchange Server, recommends using diskpart to create the primary or extended partitions. You can use a primary partition as the system partition; you can only use an extended partition for additional logical drive assignments.
The diskpart create command makes disk partitions, volumes on a single disk or multiple disks, and virtual hard disks.
For this and all following commands, you need to open the command prompt before you run diskpart. Type cmd from the run command window from the Windows search box or the run command dialog box that you open with the Windows+R key combination.
To create a partition:
- At a command prompt, type: diskpart
- At the DISKPART prompt, type list disk (Note the drive number you wish to manipulate.)
- At the DISKPART prompt, type: select disk 0 (This selects disk to edit; make sure to type in the disk number from step two.)
- At the DISKPART prompt, type create partition primary size=10000 (The size parameter refers to the size in megabytes. In this case, 10000 equals 10 GB. Change the word primary to extended to create an extended partition. If you do not set a size, then all available space on the disk will be used for the partition.)
- At the DISKPART prompt, type assign letter=D (Choose an unused drive letter.)
- At the DISKPART prompt, type exit
- From the command prompt, use the format command, or the Disk Management utility in Windows or any disk format tool to format the drive. You would typically use the NTFS file system during the initialization process.

Extending a partition using diskpart
When it comes to adding space to a partition or volume, this method is superior to configuring two disks. Dynamic disk extensions only concatenate the newly added space, meaning they merely add the disk space to the end of the original partition without restriping the data.
Concatenation isolates performance within each partition and does not offer fault tolerance when the partition is configured in a RAID array. Diskpart restripes your existing data. This is beneficial when the partition is set up in a RAID array, because the existing partition data spreads across all the drives in the array, rather than just adding new space to the end, like the Disk Management utility.
To extend a partition:
- Verify that contiguous free space is available on the same drive and that free space is next to the partition you intend to extend with no partitions in between. Be sure you have a full backup before trying this method.
- At a command prompt, type diskpart
- At the DISKPART prompt, type select disk 0 (Selects the disk.)
- At the DISKPART prompt, type select volume 0 (Selects the volume.)
- At the DISKPART prompt, type extend (If you do not set a size, then diskpart will use all available space on the disk.)

Deleting a partition using diskpart
The delete command in diskpart removes dynamic disks, partitions, volumes and shadow copies. When you have multiple volumes on the disk or an unwanted partition, such as a recovery partition , this command will remove them and return them to unallocated space.
To delete a partition:
- At the DISKPART prompt, type list partition
- At the DISKPART prompt, type select partition 4 (Selects the partition.)
- At the DISKPART prompt, type delete partition

Creating a volume using diskpart
When using dynamic disks in Windows, you can create four volume types with diskpart: volume mirror, RAID-5 volume , simple volume and striped volume.
To create a simple volume :
- At the DISKPART prompt, type create volume simple size=1000 (The size is in megabytes.)
Cleaning a disk using diskpart
When you have an entire disk to wipe clean, you can use the diskpart clean command to convert all the stored data into unallocated space. This operation deletes all data on the disk by writing zeros on each disk sector. Diskpart also removes all partition and volume information from the selected drive.
To clean a disk :
- At the DISKPART prompt, type select disk 0
- At the DISKPART prompt, type clean all

Other ways to use diskpart
For maintenance work that requires a bootable USB flash drive, you can use diskpart to format the partition and set up the file system on the removable drive. Administrators can also use diskpart in both the Windows Preinstallation Environment and Windows Recovery Environment to correct disk problems or set up the machine for deployment.
With the diskpart /s switch, administrators can run scripts to automate tasks associated with setting up Windows machines, such as configuring the disks for multiple systems, adding a recovery partition or wiping all data from a disk to return it to a factory state.
Sample code from the Microsoft site gives examples of how to develop a text-based script file administrators can call from diskpart and run automatically. IT workers can run several diskpart scripts, but Microsoft recommends building in a delay of 15 seconds after a script runs to prevent issues.
For an in-depth tutorial on how to use diskpart for preparing a Windows 10 system for deployment, this blog post on the SearchEnterpriseDesktop site provides detailed instructions to use diskpart with a script .
Dig Deeper on Windows Server OS and management

diskpart (Disk Partition Utility)

How to create a custom ISO for Windows 10

Windows 10 disk management terms and tasks IT should know

Delete the Windows recovery partition on a Lenovo Thinkpad or Desktop

Part of: Windows disk and file server management tips for admins
Learn how to generate a detailed report that uncovers unusual activity by users on a Windows file share without having to manually investigate every file and folder.
Microsoft's Azure Files offering alleviates traditional support efforts and hardware costs. Using this additional service can improve performance and keep end users happy.
Learn how to use the clustering tools provided by the Microsoft server OS to create a highly available file server to avoid downtime if disaster strikes.
A file server deployment must satisfy the needs of both the end user and the IT staff. Tune up Windows Server for a secure and performant repository for your critical data.
Many organizations still need a file server, but some of the advantages of Microsoft's cloud storage option might persuade companies to make the switch.
AWS Compute Optimizer and Cost Explorer monitor, analyze and optimize your cloud costs. Compare the two tools to choose which is ...
Azure management groups, subscriptions, resource groups and resources are not mutually exclusive. Businesses can -- and often do ...
Amazon CodeGuru reviews code and suggests improvements to users looking to make their code more efficient as well as optimize ...
Before organizations migrate to Windows 11, they must determine what the best options are for licensing. Learn about the choices ...
UEM software is vital for helping IT manage every type of endpoint an organization uses. Explore some of the top vendors and how ...
Office 365 MDM and Intune both offer the ability to manage mobile devices, but Intune provides deeper management and security. ...
Many organizations will go with remote and virtual desktop services from Citrix, Microsoft and VMware, but there are many ...
When the keyboard for a remote desktop isn't working, sys admins will need to run through these steps to find the root cause of ...
Running a remote desktop comes with all sorts of hardware considerations for IT to address, including how the desktop interacts ...
How to assign permanent letters to drives on Windows 10
You can assign drive letters manually, and in this guide, we show you how on Windows 10.

On Windows 10, when connecting a removable storage device or an internal hard drive, the system detects and assigns a drive letter automatically to make it usable. However, when reconnecting an external drive (such as a USB flash drive or SD or microSD cards), the system can end up assigning a different letter, which can be annoying.
If you want to see the same drive letter on a particular device, you can manually assign a permanent letter to any drive connected to your computer, and on Windows 10 , you can do this in at least three different ways, using Disk Management, Command Prompt, or PowerShell.
Using this approach will prevent Windows 10 from assigning a new letter or trying to set a letter already in use, which can cause conflicts. Also, it helps to select a drive letter that makes more sense to you.
In this Windows 10 guide, we walk you through several methods to manually assign a permanent letter to a drive, as long as you're connecting the drive to the same device and the letter isn't already in use.
How to assign a drive letter using Disk Management
How to assign a drive letter using command prompt, how to assign a drive letter using powershell.
To manage drive letters with the Disk Management tool, use these steps:
- Open Start .
- Search for Create and format hard disk partitions and click the top result to open the Disk Management experience.
- Right-click the drive and select the Change Drive Letter and Paths option.
- Click the Change button.
- Select the Assign the following drive letter option.
- Use the drop-down menu to assign a new drive letter. Quick tip: To avoid the system trying to assign the same letter to another drive, it's a good idea to start adding letters in backward order. For instance, instead of using D, E or F, it better to start with Z, Y or X when assigning a new letter.
- Click the OK button.
- Click the OK button again.
Once you complete these steps, the drive will permanently retain the assigned letter, even after reconnecting it. However, if you connect the drive to another device, it may receive a different letter.
While the easiest way to assign a new drive letter is to use Disk Management, you can also use DiskPart in Command Prompt to perform the same task.
To assign a drive letter using Command Prompt, use these steps:
- Search for Command Prompt , right-click the result, and then select the Run as administrator option.
- Type the following command to start DiskPart and press Enter : diskpart
- Type the following command to list all the available volumes and press Enter : list volume
- Type the following command to select the volume (drive) to assign a new letter and press Enter: select volume 3 In the command, make sure to change "3" to the number that represents the drive on your device.
- Type the following command to assign a new drive letter, and press Enter : assign letter=Z The command assigns the letter "Z" to the drive assuming it's available. However, you need to make sure to change the letter for the one that you want to use.
After completing these steps, similar to Disk Management, every time you reconnect the storage to the same device, Windows 10 should assign the same letter automatically.
Alternatively, you can also use PowerShell to change a drive letter on Windows 10 using these steps:
- Search for PowerShell , right-click the result, and then select the Run as administrator option.
- Type the following command to list the available drives and press Enter : Get-Disk
- Type the following command to assign a permanent letter to the drive and press Enter : Get-Partition -DiskNumber 1 | Set-Partition -NewDriveLetter Z In the command, make sure to change "1" to the number that represents the drive that you want to modify, and change "Z" for the new letter that you want to use.
Once you complete the steps, the drive will be accessible through File Explorer using the letter that you assigned, and Windows 10 won't try to change it.
Updated March 7, 2019: We revised this guide to make sure it's current with the latest version of Windows 10.
More Windows 10 resources
For more helpful articles, coverage, and answers to common questions about Windows 10, visit the following resources:
- Windows 10 on Windows Central – All you need to know
- Windows 10 help, tips, and tricks
- Windows 10 forums on Windows Central
Windows Central Newsletter
Get the best of Windows Central in your inbox, every day!
Mauro Huculak is technical writer for WindowsCentral.com. His primary focus is to write comprehensive how-tos to help users get the most out of Windows 10 and its many related technologies. He has an IT background with professional certifications from Microsoft, Cisco, and CompTIA, and he's a recognized member of the Microsoft MVP community.
- Scenario: I have four 16GB USB flash drives that I use for various OS installs. I typically work on one at a time, plugged into the same USB port. Sometimes I connect two at a time. I just accept that Windows will assign the next available letter to the current connected drive. So, if I manually assign a letter to one flash drive, will it get that letter every time, but the other three will not be assigned that letter?
- Yes, that's how it should work.
- Unfortunately this won't work with the same letter assigned to multiple drives. Only the most recent is remembered. They really need to get away from drive letters and switch to using the actual name of the drive.
Thank you for signing up to Windows Central. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.
- 2 Why I'm still gaming: A defense of the Xbox Series S
- 3 Xbox confirms it will not be at E3 2023 show floor, but will be part of E3 Digital
- 4 AI-Powered Bing can help answer even the vaguest video game questions
- 5 Grab this discounted Lenovo Legion 5i Pro for 25% off before its successor rolls out next month
Knowledge Base
Support downloads, suggested searches, select your country/region.
Asia-Pacific (APAC)
Middle East/North Africa
Latin America
North America

Provides access to product training, sales and marketing resources, deal registration, and more to our VARs, Integrators, Resellers and other channel partners.

Use the Lyve Cloud portal to configure and manage your object storage and services.

Provides Direct customers with B2B Self Service tools such as Pricing, Programs, Ordering, Returns and Billing.

Register, access, and manage Lyve Mobile services, subscriptions and projects.

Provides Suppliers with self-service tools targeted to the needs of their business.

View registered products, register new products, and find product specific support.
View/edit your profile information
View your dashboard
Logout of your account
- Seagate Support
- KB Articles
How to Diskpart Erase/Clean a Drive Through the Command Prompt
Twitter Facebook Google Plus Linked in
Critical Instructions:
- Disclaimer: Seagate Technology, LLC is not responsible for lost user data. Be sure to back up any important data on this drive before proceeding.
- This article explains the Microsoft Diskpart Erase utility. The command that erases the drive during this process is "Clean". In this article "Clean" and erase are used interchangeably. Cleaning or erasing a storage device removes all data and partitions from the drive.
- Please read all steps, instructions, and warnings before attempting the Diskpart Erase/Clean.
- Diskpart Erase/Clean will permanently erase/destroy all data on the selected drive . Please make certain that you are erasing the correct disk.
- Remove all additional drives from the computer excluding the drive you are booting from and the drive you want to Erase/Clean.
Items to note:
- This article will walk through the steps of using the Microsoft Diskpart Erase utility to Clean the disk of a previous partition and format, including any data on the drive. This command takes only a few minutes to complete.
- This article covers Diskpart Erasing a 3TB or larger drive that has a Master Boot Record (MBR) Partition table, which is thereby limiting its capacity to 2TB. However, this article also applies to any scenario where a Diskpart Erase of an entire disk is necessary.
- knowledge.seagate.com/articles/en_US/FAQ/218619en
- http://www.seagate.com/support/downloads/beyond-2tb/
- From the Start menu right click on Computer which will provide a drop down menu. (If you are on Windows 8 or 8.1 move your mouse to the bottom left hand corner of the desktop screen and right click . Then select Disk Management ).
- Choose Manage .
- Select Disk Management (listed under Storage).

Multicloud Maturity Report
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
create partition primary
- 2 minutes to read
- 9 contributors
Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012
Creates a primary partition on the basic disk with focus. After the partition has been created, the focus automatically shifts to the new partition.
A basic disk must be selected for this operation to succeed. You must use the select disk command to select a basic disk and shift the focus to it.
To create a primary partition of 1000 megabytes in size, type:
Related links
Command-Line Syntax Key
assign command
create command
select disk
Submit and view feedback for
Additional resources
- Dell Technologies
- Premier Sign In
- Partner Program Sign In
- Dell Financial Services
- Place orders quickly and easily
- View orders and track your shipping status
- Enjoy members-only rewards and discounts
- Create and access a list of your products
- Manage your Dell EMC sites, products, and product-level contacts using Company Administration.
Article Number: 000136959
How to Make a Bootable USB Flash Drive Using Diskpart
Summary: how to make a usb flash drive bootable using the diskpart utility., article content, article properties.
- Rate This Article
This article provides instructions on how to create a bootable USB flash drive using the Diskpart utility.
Not applicable.
Table of Contents:
- Create a bootable USB flash drive using the Diskpart utility
- How to use Diskpart
1. Create a bootable USB flash drive using the Diskpart utility
A user may want to create a bootable USB flash drive which has a larger partition than the maximum 2 GB created using the Dell Diagnostic Distribution Package (DDDP), see Article How to Create a Bootable USB Flash Drive using Dell Diagnostic Deployment Package (DDDP) .
Diskpart can be used to create a partition larger than 2 GB on the USB flash drive so larger files can be used. Diskpart is a Disk Partition utility available within Windows.
Follow the steps in the next section on how to use Diskpart to create a bootable Windows USB flash drive:
Back to Top
2. How to use Diskpart
Insert your USB flash drive (4 GB or larger preferable) into your system.
Go to the Command Prompt. Select Start and type CMD in the search field, right click on CMD.exe and select Run as administrator . Alternatively, go to Start > All programs > Accessories > right click on Command Prompt and select Run as administrator .

A User Account Control (UAC) dialog Window may appear. Click Yes to Continue.
When the Command Prompt opens, enter the following commands followed by Enter :
DISKPART - This starts the utility.
LIST DISK - This shows the disk number of your USB flash drive. In the image below the USB flash drive shows as Disk 2.

SELECT DISK X (Replace X with your USB flash drive number, we are using 2 in this example).
CLEAN - This wipes the drive.
CREATE PARTITION PRIMARY - Creates a partition.
SELECT PARTITION 1 - Selects partition 1.
ACTIVE - Marks the current partition as active.
FORMAT FS=NTFS QUICK - This formats the partition.
ASSIGN - Assigns a drive letter.
Insert your Windows DVD into the optical drive. From Command Prompt, enter the following:

Copy all files from the Windows CD to the USB flash drive using xcopy
This copies the Windows installation files onto the USB flash drive, it may take several minutes.
xcopy switches are as follows: /s - Copies directories and subdirectories except empty ones. /h - Copies hidden and system files. /f - Displays full source and destination filenames while copying. To display the full list of switches, type xcopy /? <enter>
This makes the USB drive bootable. When selected at startup, it boots straight into the Windows installation.
Affected Product
Storage, Drives & Media, Inspiron, Latitude, Vostro, XPS, Retired Models, Fixed Workstations
Last Published Date
04 Aug 2022
Article Type
- Data Structure & Algorithm Classes (Live)
- System Design (Live)
- DevOps(Live)
- Explore More Live Courses
- Interview Preparation Course
- Data Science (Live)
- GATE CS & IT 2024
- Data Structure & Algorithm-Self Paced(C++/JAVA)
- Data Structures & Algorithms in Python
- Explore More Self-Paced Courses
- C++ Programming - Beginner to Advanced
- Java Programming - Beginner to Advanced
- C Programming - Beginner to Advanced
- Full Stack Development with React & Node JS(Live)
- Java Backend Development(Live)
- Android App Development with Kotlin(Live)
- Python Backend Development with Django(Live)
- Complete Data Science Program(Live)
- Mastering Data Analytics
- DevOps Engineering - Planning to Production
- CBSE Class 12 Computer Science
- School Guide
- All Courses
- Linked List
- Binary Tree
- Binary Search Tree
- Advanced Data Structure
- All Data Structures
- Asymptotic Analysis
- Worst, Average and Best Cases
- Asymptotic Notations
- Little o and little omega notations
- Lower and Upper Bound Theory
- Analysis of Loops
- Solving Recurrences
- Amortized Analysis
- What does 'Space Complexity' mean ?
- Pseudo-polynomial Algorithms
- Polynomial Time Approximation Scheme
- A Time Complexity Question
- Searching Algorithms
- Sorting Algorithms
- Graph Algorithms
- Pattern Searching
- Geometric Algorithms
- Mathematical
- Bitwise Algorithms
- Randomized Algorithms
- Greedy Algorithms
- Dynamic Programming
- Divide and Conquer
- Backtracking
- Branch and Bound
- All Algorithms
- Company Preparation
- Practice Company Questions
- Interview Experiences
- Experienced Interviews
- Internship Interviews
- Competitive Programming
- Design Patterns
- System Design Tutorial
- Multiple Choice Quizzes
- Go Language
- Tailwind CSS
- Foundation CSS
- Materialize CSS
- Semantic UI
- Angular PrimeNG
- Angular ngx Bootstrap
- jQuery Mobile
- jQuery EasyUI
- React Bootstrap
- React Rebass
- React Desktop
- React Suite
- ReactJS Evergreen
- ReactJS Reactstrap
- BlueprintJS
- TensorFlow.js
- English Grammar
- School Programming
- Number System
- Trigonometry
- Probability
- Mensuration
- Class 8 Syllabus
- Class 9 Syllabus
- Class 10 Syllabus
- Class 11 Syllabus
- Class 8 Notes
- Class 9 Notes
- Class 10 Notes
- Class 11 Notes
- Class 12 Notes
- Class 8 Formulas
- Class 9 Formulas
- Class 10 Formulas
- Class 11 Formulas
- Class 8 Maths Solution
- Class 9 Maths Solution
- Class 10 Maths Solution
- Class 11 Maths Solution
- Class 12 Maths Solution
- Class 7 Notes
- History Class 7
- History Class 8
- History Class 9
- Geo. Class 7
- Geo. Class 8
- Geo. Class 9
- Civics Class 7
- Civics Class 8
- Business Studies (Class 11th)
- Microeconomics (Class 11th)
- Statistics for Economics (Class 11th)
- Business Studies (Class 12th)
- Accountancy (Class 12th)
- Macroeconomics (Class 12th)
- Machine Learning
- Data Science
- Mathematics
- Operating System
- Computer Networks
- Computer Organization and Architecture
- Theory of Computation
- Compiler Design
- Digital Logic
- Software Engineering
- GATE 2024 Live Course
- GATE Computer Science Notes
- Last Minute Notes
- GATE CS Solved Papers
- GATE CS Original Papers and Official Keys
- GATE CS 2023 Syllabus
- Important Topics for GATE CS
- GATE 2023 Important Dates
- Software Design Patterns
- HTML Cheat Sheet
- CSS Cheat Sheet
- Bootstrap Cheat Sheet
- JS Cheat Sheet
- jQuery Cheat Sheet
- Angular Cheat Sheet
- Facebook SDE Sheet
- Amazon SDE Sheet
- Apple SDE Sheet
- Netflix SDE Sheet
- Google SDE Sheet
- Wipro Coding Sheet
- Infosys Coding Sheet
- TCS Coding Sheet
- Cognizant Coding Sheet
- HCL Coding Sheet
- FAANG Coding Sheet
- Love Babbar Sheet
- Mass Recruiter Sheet
- Product-Based Coding Sheet
- Company-Wise Preparation Sheet
- Array Sheet
- String Sheet
- Graph Sheet
- ISRO CS Original Papers and Official Keys
- ISRO CS Solved Papers
- ISRO CS Syllabus for Scientist/Engineer Exam
- UGC NET CS Notes Paper II
- UGC NET CS Notes Paper III
- UGC NET CS Solved Papers
- Campus Ambassador Program
- School Ambassador Program
- Geek of the Month
- Campus Geek of the Month
- Placement Course
- Testimonials
- Student Chapter
- Geek on the Top
- Geography Notes
- History Notes
- Science & Tech. Notes
- Ethics Notes
- Polity Notes
- Economics Notes
- UPSC Previous Year Papers
- SSC CGL Syllabus
- General Studies
- Subjectwise Practice Papers
- Previous Year Papers
- SBI Clerk Syllabus
- General Awareness
- Quantitative Aptitude
- Reasoning Ability
- SBI Clerk Practice Papers
- SBI PO Syllabus
- SBI PO Practice Papers
- IBPS PO 2022 Syllabus
- English Notes
- Reasoning Notes
- Mock Question Papers
- IBPS Clerk Syllabus
- Apply for a Job
- Apply through Jobathon
- Hire through Jobathon
- All DSA Problems
- Problem of the Day
- GFG SDE Sheet
- Top 50 Array Problems
- Top 50 String Problems
- Top 50 Tree Problems
- Top 50 Graph Problems
- Top 50 DP Problems
- Solving For India-Hackthon
- GFG Weekly Coding Contest
- Job-A-Thon: Hiring Challenge
- BiWizard School Contest
- All Contests and Events
- Saved Videos
- What's New ?
- Data Structures
- Interview Preparation
- Topic-wise Practice
- Latest Blogs
- Write & Earn
- Web Development
Related Articles
- Write Articles
- Pick Topics to write
- Guidelines to Write
- Get Technical Writing Internship
- Write an Interview Experience
- SDE SHEET - A Complete Guide for SDE Preparation
- Naive Bayes Classifiers
- Removing stop words with NLTK in Python
- Linear Regression (Python Implementation)
- Apriori Algorithm
- Decision Tree
- Software Engineering | Coupling and Cohesion
- Supervised and Unsupervised learning
- ML | Linear Regression
- Reinforcement learning
- What is Algorithm | Introduction to Algorithms
- Decision Tree Introduction with example
- Python | Decision tree implementation
- KDD Process in Data Mining
- How to Run a Python Script using Docker?
- ML | Underfitting and Overfitting
- Getting started with Machine Learning
- Best Python libraries for Machine Learning
- Software Engineering | Prototyping Model
- ML | Label Encoding of datasets in Python
- Clustering in Machine Learning
- Docker - COPY Instruction
- Confusion Matrix in Machine Learning
- Python | Mean Squared Error
- Difference between NP hard and NP complete problem
- Understanding Logistic Regression
- K means Clustering - Introduction
- Digital Image Processing Basics
- K-Nearest Neighbours
Diskpart Command in Windows
- Difficulty Level : Basic
- Last Updated : 30 Nov, 2021
DiskPart is a powerful tool for disk management under Windows OS. Diskpart Command is used to manage the computer hard drive, partitions, and volumes. This Command is not only limited to Windows 10 but also available in Windows 8.1,8,7 or even in Windows 2000. The Diskpart is used from creating or deleting partitions to wiping the drive clean or fixing errors on drives.
Diskpart looks similar to the Disk Management tool, but the only difference is that diskpart is a command prompt utility which makes it more powerful and provides more functionality than the Disk Management tool.
Let us see how Diskpart can help you to manage your drives, partitions, and volumes.
Note: You should always run your computer in Administrator mode while you are making use of DiskPart.
Parameters:
You can run the following commands from the Diskpart command interpreter:
Open and List Drives or Partitions or Volumes:
It is important to list the drives, partitions, or volumes before we go ahead and implement DiskPart commands on them. Follow the below-mentioned steps to list the drives:
- Type diskpart , after pressing Windows+R Keys and clicking on ok.
- In the DiskPart command Window, type list disk and hit Enter
- This will list all the available drives with a number specified to them starting from 0.
- If you want to see all the volumes then type list volume and hit Enter.
- This will list all the available volumes with a number specified to it starting from 0.
The above article, explains the use cases and parameters of the diskpart command on Windows.
Please Login to comment...
- Computer Subject
- Operating Systems
New Course Launch!
Improve your Coding Skills with Practice
Start your coding journey now.
More Recovery Products
- Partition Manager Partition Master Personal disk manager Partition Master Enterprise Business disk optimizer Edition Comparison Partition Master Versions Comparison Disk Copy Hard drive cloning utility Partition Master Free Partition Master Pro
Centralized Solutions
MSPs Service
Screen Capture
Video Toolkit
Audio Tools
Transfer Products
File Management
iOS Utilities
More Products
- Support Support Center Guides, License, Contact Download Download installer Chat Support Chat with a Technician Pre-Sales Inquiry Chat with a Sales Rep Premium Service Solve fast and more
How to Create Volume/Partition Using Diskpart? [Full Guide]
Diskpart is a built-in disk tutility that offers multiple ways to assist you creating partition and handling volumes in Windows 11/10. Our article shows you how to use Diskpart to create partition and other Diskpart commands that could be applied to create boot volume, system volume, dynamic volume, RAID-5 volume, Mirrored System volume, and UEFI system volume.
Windows 11/10/8/7 100% Secure

What Is Diskpart
Featured Articles
- 01 Use Diskpart to Create Volume (Boot, System, RAID, etc.)
- 02 Use DiskPart to Delete All Partitions in Windows
- 03 Use Diskpart to Convert GPT Disk to MBR
- 04 Use Diskpart to Merge Partitions
- 05 Best Diskpart Alternatives for Windows 11/10/8/7
- 06 Use Diskpart to Fix Device Read Only Issue
- 07 Troubleshooting 1: Fix DiskPart I/O Device Error in Windows 10/8/7
- 08 Troubleshooting 2: Fix Diskpart Has Encountered an Error Access Is Denied
- 09 Troubleshooting 3: Fix Diskpart Failed to Clear Disk Attributes
- 10 Troubleshooting 4: 8 Fixes to Remove System Cannot Find the File Specified Error
- 11 Troubleshooting 5: How to Fix DiskPart Virtual Disk Service Errors
- 12 Diskpart Delete Partition Override Not Working
- 13 Diskpart Clean Not Working on Disk/USB/SD Card
This page covers multiple Diskpart commands, you can apply to create partitions and volumes using Diskpart as shown here:
How Do I Create a New Volume in Diskpart
Diskpart , also known as Windows built-in free disk utility, it presents Windows users with multiple features in managing disk partitions, fixing device errors, programming, developing, and testing, etc. Due to its high accessibility, free-to-use, and flexibility, Diskpart is popular among Windows users for manaing hard drive partitions.
If your partitions are not well managed, your system may have a lot of free unallocated space. Therefore, Windows users oftern use the Diskpart create partition command to manage their system drives and storage devices.
There are different types of partitions that you can create in Windows. You can do it all using Diskpart to create partitions in Windows 11/10 with different commands no matter the partition type.
Here, our article will show you an in-detail step-by-step guide to using Windows diskpart command to create partitions.
There are detailed guides on how to use Diskpart to create different volumes. Share this article to help other users having the same issues.
#1. Use Diskpart to Create Partition/Volume
Diskpart create partition is a built-in command in Windows operating system. Using this command, you can manage, create, and edit your partitions in Windows OS. Let's see below how to create different partition volumes using the diskpart command.
1. Create System Volume, Primary Partition Using Diskpart
Diskpart command also allows you to create system volume. System volume, also known as the primary partition, which is the place where your operating system and propgrams are installed.
Follow the below steps to create system volume using the diskpart command:
Step 1: Open CMD on your Windows computer.
Step 2: Enter diskpart and then Type list disk.
Step 3: Select a disk using the select disk x command. (Replace x with the number of the disk you wish to select)
Step 4: Type the command create partition primary size=20480 to initialize a new partition with a size.
Entering the above will create a primary system volume partition. If you need to create a logical partitoin, replace create partition primary with create partition logical . Also, you can change the size according to your needs.

Step 5. Type exit to close Diskpart when the process completes.
After creating a system volume partition, you can clean install a Windows or applications in it.

[Infographic] Create Partiton Using Diskpart, Disk Management, and Software
Alongside Diskpart, you can also create partition using Disk Management or third-party partition manager software like EaseUS Partition Master. Follow this guide to learn the difference and detailed steps.

2. Create Boot Volume Using Diskpart
Boot volume is the primary partition of your operating system. It's also known as a bootable partition. All your operating system files are stored in this partition. In simple terms, your operating system resides in the boot volume portion.
To allow computer load the boot information, you'll also need to mark the boot volume active. Follow the below steps to create a boot volume using the diskpart command in Windows operating system:
You can do that by pressing the "Windows + R" key, which will open a Run box. Type cmd and hit OK .

Step 2: In CMD, enter the diskpart command and open the diskpart utility.
Step 3: Type list disk and press enter to list all your disks.
Step 4: Select a disk using the select disk x command. (Replace x with the number of the disk you wish to select)
Step 5: Enter the list volume command to see available volumes for your disk.
Step 6: Enter the select volume n command to select the volume you wish to make as a boot partition. (n is the number for your volume)
Step 7: Enter the active command, and you will have the specified volume as a boot partition.
Now, exit CMD, and restart your system to see the changes.

3. Create Dynamic Volume Using Diskpart
Dynamic volume disk allows you to manage your disks with more flexibility.
You don't have to specify a size while creating a dynamic partition disk. Your disk can evolve and grow over time.
Follow the below steps to create a dynamic volume using the diskpart command:
Step 2: Type diskpart.
Step 3: Type list disk.
Step 4: Type list volume.
Step 5: Select a disk using the select disk x command. (Replace x with the number of the disk you wish to select)
Step 6: Type the convert dynamic command to convert your selected volume to a dynamic volume.

4. Create RAID-5 Volume via Diskpart Commands
RAID-5 (A redundant array of independent disks) is a type of disk volume that efficiently utilizes your storage. Along with better storage management, it gives you good security and disk performance.
Follow the below steps to create RAID-5 volume using the diskpart command:
Step 3: Type list disk to see your current disk numbers.
Step 4: Enter create volume raid disk=1 (Here 1 is the disk number that you are creating as RAID-5 volume. You can change this number with other disk numbers).

5. Create Mirrored System Volume
The mirrored system partition allows you to create a clone of data from another volume. Primarily, users need it for creating backup device data. Follow the below steps to create mirrored system volume using diskpart:
Step 3: Type list disk and then a select disk which volume you want to mirror by selecting disk x command.
Step 4: Type list volume to list the volume of the selected disk.
Step 5: Now, type the select volume c command to choose the volume you want to mirror to a disk. (replace c with the volume alphabet of your choice)
Step 6: Enter the command add disk=x (replace x with the disk where you want a backup of the selected volume).
Step 7: Enter the retain command, and you will be able to create mirrored system volume successfully.

6. Create UEFI System Volume
UEFI (Unified Extensible Firmware Interface) system volume holds your system initialization and startup information. You can create UEFI system volume using diskpart by following the commands below:
Step 2: Type diskpart in CMD and press enter.
Step 3: Enter the list disk command and select disk x to select the disk.
Step 4: Convert your selected disk to GPT using the convert gpt command.
Step 5: Now create the UEFI system partition using create partition efi size=100
That's it, entering this command will create a UEFI system volume on your selected disk.

#2. Diskpart Alternative Software Free Download - EaseUS Partition Master
Using diskpart creat partition commands, you can create partition volumes of any type. However, this method is not suited for beginners and people that have not interacted with command-line interfaces.
An alternate solution is to use EaseUS Partition Master Free which is a reliable disk partition software that perfectly replaces Diskpart.
EaseUS Partition Master Free edition helps you convert your partitions, manage the partitions, and create new partitions. It is a GUI-based tool, which means you do not have to remember or enter any command.
Using simple clicks, you can easily create a partitioned volume of your choice. It is highly recommended because a user with any computer expertise can smoothly use this software.
Step to use EaseUS Partition Master
Step 1. Launch EaseUS Partition Master. On the main window, right-click on the unallocated space on your hard drive or external storage device and select "Create".
Step 2. Adjust the partition size, file system (Choose the file system based on your need), label, etc. for the new partition and click "OK" to continue.
Step 3. Click on the "Execute 1 Task(s)" button and create a new partition by clicking "Apply".
Watch the following video tutorial and learn how to create a partition in NTFS, FAT, or EXT file system.
There are various types of partitions in the Windows computer system. Such as boot volume, system volume, dynamic volume, RAID-5 volume, mirrored system volume, and UEFI system volume.
Diskpart create partition command helps you to create these partitions in Windows. The diskpart utility is built-in, and you can access it through CMD without needing any software installation.
Unfortunately, entering commands to create partitions is not everyone's cup of tea. There is another easy way to create partitions in the Windows operating system for people who struggle with commands.
The alternate method is to use EaseUS Partition Master Free edition software. It does everything that the diskpart command does, but with just a few clicks.
FAQs about Creating Partitions Using Diskpart
Aside from the above tutorials, some of you may also have questions about creating other types of partitions by using Diskpart. Check the questions here, and hope you find desired answers ans solutions here.
1. How do I crate a GPT Partition Using Diskpart?
- Press Windows + R keys, type cmd in Run dialog and hit enter.
- Type diskpart and hit Enter.
- Type list disk and hit Enter. Comfirm if your target disk is GPT or not.
If yes, continue with the steps here:
- Type select disk * and hit Enter.
- Type create partition primary =* and hit Enter.
- Then type assign letter=* and hit Enter.
- Type format fs=NTFS quick and hit Enter.
If not, back up all data to another drive, then continue with steps here:
- Type select disk * and hit Enter.
- Type clean in diskpart and hit Enter.
- Type convert GPT and hit Enter.
2. How do I create a MBR partition using Diskpart?
- Open Diskpart and type list disk to confirm if your target disk is MBR or not.
If yes, follow the steps below:
If not, back up all valauble data to another drive, then follow the steps here:
- Type select disk * and hit Enter.
- Type clean in Diskpart and hit Enter.
- Type convert mbr and hit Enter.
3. How to create multiple partitions usign Diskpart
- Press Windows + R keys and type diskpart in Run dialog, and hit Enter.
- Type list disk and hit Enter.
- Type select disk * and hit Enter.
- Type create partition primary size=* and hit Enter.
- Type assign letter=* and hit Enter.
- Type format fs=NTFS quick and hit Enter.
- Type select disk * and hit Enter
- Type create partition primary size=* and hit Enter.
- Type assign letter=** and hit Enter.
- Type format fs=NTFS quick and hit Enter.
Repeat the process until you create multiple partitions on the target disk. Note that the MBR disk only alows creating up to 4 primary partitions. If you want more than 4 primary partitions on the disk, you'll need to convert the MBR disk to GPT first.
Was This Page Helpful?

Updated by Sherly
Sherly joined EaseUS in 2022 and she has always loved writing articles and enjoys the fun they bring. She receives professional training here, focusing on product performance and other relative knowledge.
Read full bio

Written by Tracy King
Tracy joined in EaseUS in 2013 and has been working with EaseUS content team for over 10 years. Being enthusiastic in computing and technology, she writes tech how-to articles and share technical solutions to resolve Windows & Mac data recovery, data backup, partition management, data transfer, Windows update issues, etc.
Related Articles
How to Burn ISO to USB on Windows 10, Here Is Full Guide

What Is USB Write Protected Formatter and How to Use It? [2023 Guide]

Windows 11 Download Without TPM 2.0 & Run Windows 11 Without TPM

[Allocation Unit Size FAT32 Guide] What Allocation Unit Size Should I Use for FAT32

Copyright © EaseUS. ALL RIGHTS RESERVED.

IMAGES
VIDEO
COMMENTS
The diskpart command interpreter helps you manage your computer's drives (disks, partitions, volumes, or virtual hard disks). Before you can use diskpart commands, you must first list, and then select an object to give it focus. After an object has focus, any diskpart commands that you type will act on that object. Determine focus
In addition, you cannot assign a drive letter to an Original Equipment Manufacturer (OEM) partition or any GUID Partition Table (gpt) partition other than a basic data partition. Syntax assign [ {letter=<d> | mount=<path>}] [noerr] Parameters Examples To assign the letter E to the volume in focus, type: assign letter=e Related links
The diskpart utility makes it easy. You'll need to start by opening an administrator mode command prompt — type cmd into the search box, and then right-click and choose Run as administrator, or use the CTRL + SHIFT + ENTER keyboard shortcut. Once there, run the diskpart command, and then type in the following to list out the volumes on your system.
The diskpart Command Prompt command is used to create or delete partitions on hard drives . Diskpart Command Availability The diskpart command is available from within the Command Prompt in Windows operating systems, including Windows 11, 10, 8, etc. You can also access this command from the Recovery Console in Windows 2000 and Windows XP.
To run a diskpart script, at the command prompt, type the following command, where scriptname is the name of the text file that contains your script: diskpart /s scriptname.txt To redirect diskpart's scripting output to a file, type the following command, where logfile is the name of the text file where diskpart writes its output:
In addition to Diskpart, Disk Management may be another good choice to assign drive letter. Step 1. Press " Win + R " to open the " Run " window and type diskmgmt.msc in the box. Step 2. Right-click the drive you want to assign, and select change Drive Letter and Paths in the pop-up window. Step 3. Click Change to summon the next window.
To assign a drive letter to an existing partition, please refer to the following command: assign letter=F (F can be replaced with another letter that has not been used yet). And then, you will receive a message says: DiskPart successfully assigned the drive letter or mount point. 5. Extend Partition
To open Diskpart in Windows, right-click your Windows Start menu button and click Windows PowerShell (Admin). In your admin-level PowerShell terminal (or similar Windows command line), type diskpart and hit enter. The Diskpart tool will launch within the window, ready for you to use. Type exit at the "DISKPART>" prompt and hit enter once ...
In Command Prompt or PowerShell, type diskpart to access the Windows tool called Diskpart. Launching diskpart in Command Prompt After you have launched diskpart it is time to establish which hard disk or solid state drive you want to use for creating a new partition. You can select the drive with the select command.
Search for Command Prompt, right-click the top result, and select the Run as administrator option. Type the following command to launch DiskPart and press Enter: diskpart Type the following...
Open a command prompt and type diskpart. At the DISKPART prompt, type list volume, making note of the volume number you want to assign the path to. At the DISKPART prompt, type select volume <volumenumber>, specifying the volume number that you want to assign the path to. At the DISKPART prompt, type assign [mount=<path>]. To remove a mount point
At the DISKPART prompt, type assign letter=D (Choose an unused drive letter.) At the DISKPART prompt, type exit From the command prompt, use the format command, or the Disk Management utility in Windows or any disk format tool to format the drive. You would typically use the NTFS file system during the initialization process.
Type the following command to assign a permanent letter to the drive and press Enter: Get-Partition -DiskNumber 1 | Set-Partition -NewDriveLetter Z In the command, make sure to change "1" to the ...
This is the Command Prompt window. From the command prompt, type diskpart and press Enter. The diskpart prompt will open. From the diskpart prompt, type list disk and press Enter. A list of disks will appear in a text format. You will return to the diskpart prompt. Step one verified that Disk 1 is the 3TB drive.
For master boot record (MBR) disks, you must specify a partition type byte, in hexadecimal form, for the partition. If this parameter isn't specified, the command creates a partition of type 0x06, which specifies that a file system isn't installed. Examples include: LDM data partition: 0x42. Recovery partition: 0x27.
Procedure Open up a command prompt (CMD/PowerShell). Type "diskpart" to start up diskpart. You will see the prompt change to "DISKPART>". Type "list vol" to list all available volumes. You can identify the drive by size and file system. Additionally, the volume doesn't currently have a drive letter. Select the volume using "sel vol <number>".
Go to the Command Prompt. Select Start and type CMD in the search field, right click on CMD.exe and select Run as administrator. Alternatively, go to Start > All programs > Accessories > right click on Command Prompt and select Run as administrator. A User Account Control (UAC) dialog Window may appear. Click Yes to Continue.
Type diskpart, after pressing Windows+R Keys and clicking on ok. In the DiskPart command Window, type list disk and hit Enter This will list all the available drives with a number specified to them starting from 0. If you want to see all the volumes then type list volume and hit Enter.
Step 1: Open CMD on your Windows computer. Step 2: Enter diskpart and then Type list disk. Step 3: Select a disk using the select disk x command. (Replace x with the number of the disk you wish to select) Step 4: Type the command create partition primary size=20480 to initialize a new partition with a size.
1. Open a command prompt 2. Type in diskpart 3. Type list disk to see a list of disks 4. Type select disk # (where # is the disk you want) 5. Type detail disk to see partitions 6. Type select...