command prompt diskpart assign drive letter

Top Contributors in Windows 11: Ramesh Srinivasan  -  neilpzz  -  Kapil Arya MVP  -  _AW_  -  Horace Wiggins   ✅

February 14, 2024

Top Contributors in Windows 11:

Ramesh Srinivasan  -  neilpzz  -  Kapil Arya MVP  -  _AW_  -  Horace Wiggins   ✅

  • Search the community and support articles
  • Search Community member

Ask a new question

LightJack05

  • Article Author

Manually assigning a drive letter using CMD/Diskpart

[Localization from this article: Manuelles Zuweisen eines Laufwerksbuchstaben mit CMD bzw. Diskpart - Microsoft Community ]

Technical Difficulty: Expert

Applies to: Windows 10 & 11

In some cases, Windows will not assign a drive letter automatically to an inserted drive. For example, this can happen when using a Windows installation media.

In that case, you can use diskpart to manually assign a drive letter.

NOTE: If your drive doesn't get assigned a drive letter, even though you are in a normal Windows environment, this can indicate a problem with the drive. Please back up your files in that case.

Open up a command prompt (CMD/PowerShell).

Type "diskpart" to start up diskpart. You will see the prompt change to "DISKPART>".

command prompt diskpart assign drive letter

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.

command prompt diskpart assign drive letter

Select the volume using "sel vol <number>".

command prompt diskpart assign drive letter

Assign the drive letter using "assign letter=<letter>".

command prompt diskpart assign drive letter

You can now exit diskpart by typing "exit" and switch to the drive using "<letter>:".

command prompt diskpart assign drive letter

It should also be available from Windows Explorer now.

50 people found this helpful

  • Subscribe to RSS feed

Was this article helpful? Yes No

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this article?

Thanks for your feedback, it helps us improve the site.

Thanks for your feedback.

Comments (17) 

* Please try a lower page number.

* Please enter only numbers.

Joe13 B-) 2.0

Thanks for the tutorial, I don't think I need to use Google for it anymore!

Congrats on Article Author too! :)

Report abuse

6 people found this comment helpful

Was this comment helpful? Yes No

How satisfied are you with this comment?

Thanks for the tutorial, I don't think I need to use Google for it anymore! Congrats on Article Author too! :)

5 people found this comment helpful

Thanks! Happy I could help! :)

1 person found this comment helpful

RAJU.MSC.MATHEMATICS

Very helpful Thanks.

3 people found this comment helpful

Thank for this informative article.

I ran this in PowerShell PS C:\WINDOWS\system32> GWMI -namespace root\cimv2 -class win32_volume | FL -property DriveLetter, DeviceID

The results are below. I need to know more about the DriveLetter, that does not have a letter and I cannot give it a letter, as you can see in DiskPart.

I'm sure someone personally hacking my computer. I'm wondering if this them hiding on it, and that is why I someone is typing over me and has more control at times of my computer then I do. Maybe a hidden AD Hoc.

I have searched for this on Google I'm either getting blocked or there is no information out there on this.

PS C:\WINDOWS\system32> GWMI -namespace root\cimv2 -class win32_volume | FL -property DriveLetter, DeviceID

DriveLetter : B:

DeviceID : \\?\Volume{26xxxxxx--xxxx-xxxx-xxxxxxxxxxxxxx}\

DriveLetter : C:

DriveLetter :

DeviceID : \\?\Volume{d5xxxxxx--xxxx-xxxx-xxxxxxxxxxxxxx}\

DriveLetter : D:

PS C:\WINDOWS\system32> DiskPart

Microsoft DiskPart version 10.0.19041.1

Copyright (C) Microsoft Corporation.

On computer: My Computer

DISKPART> List Volume

Volume ### Ltr Label Fs Type Size Status Info

---------- --- --- -------- ----- ---------- ------- --------- --------

Volume 0 D RAW DVD-ROM 2048 B Healthy

Volume 1 B System Rese NTFS Partition 100 MB Healthy System

Volume 2 C NTFS Partition 698 GB Healthy Boot

2 people found this comment helpful

I followed the instructions to CHANGE the letters assigned for three external hard drives. (The computer had named them E, F, G but gave the names to the wrong external hard drive) I changed the letters to the correct names singly (I disconnected the two not being adjusted) Now, I have 2 E, 2 F, 2 G names in the list (when accessed through File Explorer. When I click on "This PC", it shows just the one of each. If I click on either, or both of the same letter name, the same exact files will open. This is annoying. Anyone have a clue what can be done? This is on a brand new computer running Windows 11.

Sorry about the late reply.

That sounds weird... Usually, windows doesn't allow you to assign a drive letter twice.

If you want to change the letters, you usually have to remove them first and then reassign them.

Can you send me a screenshot of disk management, and of the list of volumes?

the partition that is not shown in diskpart is most likely some sort of recovery or reserved partition.

This is not the typical way of hiding an infection with malware...

Also, do note that your ESP (Volume B) should not be mounted, since modifying it can corrupt your Bootloader.

As for the suspected hacking, what symptoms did you observe? Mouse moving on its own, high resource usage, unexpected firewall prompts? Other things?

If you have a compromised system, its almost impossible to clean it from infections without doing a clean install of windows. I would suggest you do that if you suspect an infection. It will take time though and will delete everything on your PC. (Including files, programs, settings.) Create a backup before you reinstall.

There are no viruses nor malware on this computer. I believe it is a reflection of the original name choice. The information contained on each external hard drive is identical, yet when I go into MY PC, it only shows one set of externals. I am afraid to delete one of the duplicates because it might be just mirrored and it will make everything go away. I have way too many things on these external hard drives to lose any of them.

Thanks for your input. Jan

Forum Article Info

  • Devices and drivers
  • Norsk Bokmål
  • Ελληνικά
  • Русский
  • עברית
  • العربية
  • ไทย
  • 한국어
  • 中文(简体)
  • 中文(繁體)
  • 日本語

How-To Geek

How to use the diskpart utility to assign and remove drive letters.

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.

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.

command prompt diskpart assign drive letter

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.

command prompt diskpart assign drive letter

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.

command prompt diskpart assign drive letter

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.

command prompt diskpart assign drive letter

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.

command prompt diskpart assign drive letter

Don't bother trying to change your C: drive, because that's not going to work.

How to Remove and Assign Drive Letters in Windows with Diskpart

Vamsi Krishna

Diskpart is one of the most powerful Windows command line utilities which first appeared in Windows XP. Diskpart is mainly used by Windows administrators to manage tasks like partition management, formatting, creating, re-sizing and getting a detailed information regarding the hard disk or other removable disks attached to the computer. Even though you have a built-in GUI application called Disk Management utility in Windows, Diskpart is much more flexible and works well in a server environment where you need to set up some advanced features like RAID.

Note: This post isn’t intended for beginners, and doing something wrong while using Diskpart utility may cause drive failures and data losses, so make sure that you have a good backup before continuing. You have been warned.

Assign Drive Letter Using Diskpart

Assigning a new drive letter to a partition or removable device using Diskpart is really easy. First, search for the command prompt in the Start menu, right click on it and select the option “Run as administrator.” If you are using Windows 8, press “Win + X” to open the power user menu and select the option “Command Prompt (Admin).”

diskpart-launch-cmd-as-admin

The above action will open the command prompt window with administrative rights. Here enter the following command to start the Diskpart utility.

diskpart-cmd-diskpart

The next step is to list all the volumes in your computer so that you can clearly see all the volume numbers and drive letters of your hard disk partitions and any other removable devices. Use the command below to list all the volumes.

diskpart-list-volume

Once the Diskpart utility lists all the volumes, take a note of the volume number of the drive you want to assign a new drive letter. In my case, I’m trying to assign a new drive letter to the drive I:\ , so my volume number is 7 . Now execute the following command to select the volume while replacing the # symbol with an actual volume number.

diskpart-select-volume

Once the volume is selected, use the following command to assign a new drive letter. Don’t forget to replace the letter “V” with the drive letter you want to assign.

diskpart-assign-letter

That’s all there is to do; you have successfully changed or re-assigned a new drive letter to a partition or a removable drive in Windows. In fact, if you open the Windows explorer, you can see that the change is reflected immediately.

diskpart-drive-letter-changed

Remove Drive Letter using Diskpart

Before moving any further, removing or un-assigning drive letter will effectively hide the drive or partition from plain sight, i.e. you cannot see that drive in the Windows explorer. To remove a drive letter, follow the above steps 1 through 4 and then use the below command to remove the drive letter of a drive or partition. Don’t forget to replace the letter “I” with the actual drive letter.

diskpart-remove-letter

As soon as you have done that, Diskpart will remove the drive letter for that volume. If you list the volumes again, you will see that the drive you just interacted with will have no drive letter next to it.

diskpart-letter-removed

Moreover, if you navigate to the Windows explorer, you will see that the drive which got un-assigned isn’t listed anymore. But again, always be careful while you are messing around with Diskpart utility; it may cause irrecoverable data loss if used incorrectly.

Hopefully that helps, and do comment below if you face any problems while following the steps or to simply share your thoughts.

Our latest tutorials delivered straight to your inbox

Vamsi Krishna

Vamsi is a tech and WordPress geek who enjoys writing how-to guides and messing with his computer and software in general. When not writing for MTE, he writes for he shares tips, tricks, and lifehacks on his own blog Stugon.

Wsl Neofetch

  • Gotta Get It: Hot Tech Deals at Target
  • Hands On: Samsung Galaxy S24 Ultra

Diskpart Command

Use the 'diskpart' command to manage hard drive partitions

command prompt diskpart assign drive letter

  • 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

  • Fixboot Command (Recovery Console)
  • More Command
  • Rename Command
  • Copy Command
  • Fixmbr Command (Recovery Console)
  • Dir Command
  • Bootcfg Command
  • Format Command
  • AOMEI Partition Assistant Standard Edition v10.3.0 Review
  • How to Fix the 'Operating System Not Found' Error
  • Net Send Command
  • Net User Command (Examples, Options, Switches, & More)
  • Del Command
  • How to Delete System Error Memory Dump Files
  • The 34 Best Free Data Destruction Tools of 2024
  • Expand Command

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.

command prompt diskpart assign drive letter

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

Get the Windows Central Newsletter

All the latest news, reviews, and guides for Windows and Xbox diehards.

Mauro Huculak

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.

  • 2 Helldivers 2 players are sitting AFK to avoid server capacity queues, but Arrowhead is readying the boot
  • 3 This new Bethesda collection includes SEVEN great Fallout games on PC, and it's... Actually an awesome deal?
  • 4 The possibilities are (almost) endless with this Verizon Fios deal that gets you a $300 gift card
  • 5 Windows Central Podcast #340: Windows 11 version 24H2 confirmed!

command prompt diskpart assign drive letter

OnMSFT.com

Diskpart Commands: How to Manage Hard Drive Partitions in Windows 11/10

Pranav Bhardwaj

August 29, 2023

How to Manage Hard Drive Partitions using Diskpart

Looking for more How To posts? Check out our How To Page for all the latest tips on Windows, Microsoft Teams, LinkedIn, and more!

In this article

Efficient hard drive management is essential for maintaining an organized and optimized computer system. Windows operating systems offer various tools to help users manage their data, and Diskpart is one such powerful utility. Diskpart allows users to manipulate hard drive partitions directly from the command line, providing granular control over disk space allocation.

Whether you want to create, extend, delete, or format partitions, Diskpart offers a command-line-driven approach that’s particularly useful for system administrators and advanced users. This guide delves into the details of using Diskpart to manage hard drive partitions effectively in Windows 11/10.

What is Diskpart?

Diskpart, short for “Disk Partition,” is a command-line utility included in Windows 11/10 that empowers users to manage disks, partitions, and volumes. Unlike graphical interfaces, Diskpart operates solely through text-based commands, offering a powerful way to interact with storage devices. It’s especially valuable for managing partitions in scenarios where the graphical interface might not be accessible, such as during system recovery or maintenance.

Diskpart provides a comprehensive set of commands that enable users to create new partitions, extend existing ones, format partitions with different file systems, and even remove partitions entirely. Its versatility and direct control over disk structures make it a preferred tool for those who require a more hands-on approach to disk management.

Precautions to take while using Diskpart commands

While Diskpart can be a highly effective tool, it’s essential to take precautions before using its commands to avoid unintended data loss or system disruptions. 

Here are some precautions to consider:

  • Backup Your Data : Before performing any disk management operations using Diskpart, create backups of your critical data. Diskpart commands can lead to irreversible changes, and having a backup ensures that you can restore your data if something goes wrong.
  • Double-Check Disk Selection : Make sure you’re selecting the correct disk and partition when applying Diskpart commands. A wrong selection can result in unintended changes to your system.
  • Understand Commands : Familiarize yourself with the specific commands you’re going to use and their implications. Misinterpreting commands can lead to data loss or system instability.
  • Use “List” Commands : Utilize commands like list disk, list partition, and list volume to get a clear view of your disk configuration before making any changes. This helps you verify your selections.
  • Avoid Direct “Clean” Command : Be cautious with the clean command, as it removes all partitions from a selected disk without confirmation. This command can lead to complete data loss if not used carefully.

List of common Diskpart commands

Diskpart commands are the building blocks of disk management. Here’s a list of common commands along with their purposes:

How to launch Diskpart on Windows 11/10

Launching Diskpart is a straightforward process. Here’s how you can do it:

  • Press Windows + R to launch the Run Command box. 

Launch Command Prompt with Admin Rights

  • If prompted by User Account Control, click “Yes” to grant administrative privileges to Diskpart. You’ll now be within the Diskpart environment, ready to execute disk management commands.

Diskpart Commands

How to check existing hard drives, volumes, & partitions using DiskPart

Before making any changes, it’s crucial to understand your disk’s current configuration. Diskpart can help you get this information:

  • Open the Command Prompt and enter diskpart.

List Disk Command

  • Type select disk <number> to choose the disk you want to inspect.
  • Similarly, use the list partition and list volume commands to see the partitions and volumes on the selected disk.

List Partition

How to create a partition using Diskpart

Creating a partition using Diskpart provides you with control over its size, file system, and drive letter assignment. 

Creating a partition using Diskpart involves a few steps. Let’s go through the process:

  • Launch Diskpart as described earlier.
  • To access the disk list, use the list disk command, and then choose the desired disk by entering its corresponding number with the select disk # command, where “ # ” is the disk number.

Ensure You Selected The Right Disk

  • After selecting the disk, use the clean all command to wipe out the disk. (optional step)
  • Once the disk is wiped out, use the create partition primary command to create a partition using the entire space on that drive.
  • If you want to create multiple partitions, you can assign how much space a partition could take. For that, use the create partition primary size=X command, where “ X ” is the size that you wish to set to the partition in megabytes.
  • After creating the partition, format it with a file system using the format fs=<filesystem> quick command. For instance, use the format fs=ntfs quick for NTFS or format fs=fat32 quick for FAT32.
  • Once the formatting process is complete, Diskpart will automatically assign a letter to the partition. In the event that it does not, you can manually set it by using the command assign letter=<letter> . Replace “ <letter> ” with the desired drive letter. 

Create Partition Using Diskpart

How to extend a partition using Diskpart

Extending a partition allows you to combine unallocated space with an existing partition. It’s an excellent way to make efficient use of available space.

Here’s how you can do it:

  • Launch Diskpart using the earlier method.
  • Make sure that there is enough free space adjacent to the partition you plan to extend on the same drive without any partitions in between. Verify the contiguous availability of the free space.
  • Use the list disk command to list all the attached disks on your system. Choose the disk containing the partition you want to extend using the select disk <number> .
  • Next, use the list volume command to get the list of all the volumes under the selected disk.
  • Now, choose the volume that you want to extend using the select volume # command. Insert the volume number in place of “ # ”.
  • Next, use the extend command to add the entire free space to the selected volume. However, if you don’t want to include the entire unallocated space to the selected volume, use the extend size=# , and replace “ # ” with the amount of space you want to extend in megabytes.

Extend The Disk Using Diskpart

How to shrink a volume using Diskpart

Shrinking a volume allows you to reclaim unused space, which can then be used to create new partitions or extend existing ones. Here’s how you can shrink a volume using Diskpart:

  • Launch Diskpart using the previously outlined steps.
  • Type list volume to see a list of all volumes on your system. Note the volume number of the one you want to shrink.
  • Enter select volume <number> to choose the volume you wish to shrink.
  • To initiate the shrinking process, type shrink desired=<size> and press Enter. Replace “ <size> ” with the amount of space you want to shrink the volume by in megabytes.
  • Diskpart will calculate the available space that can be shrunk based on the specified size.
  • Once the process is complete, you can exit Diskpart by typing exit and pressing Enter.

Shrink Volume Using The Diskpart

How to delete a partition using Diskpart

You can easily delete a partition, too, using Diskpart. Removing a partition should be done with caution, as it leads to data loss. Follow these steps:

  • Open the Command Prompt and launch Diskpart.
  • Select the disk containing the partition you want to delete using select disk <number> . If you don’t know the disk number, use the list disk command.
  • Now, use the select partition <number> command to select the partition that you want to delete. Use the list partition command if you don’t know the partition number.
  • After selecting the partition, use the delete partition command to delete it.

Delete A Partition Using Diskpart

Similarly, you can use the delete volume command to delete a partition.

How to completely wipe out the hard disk using DiskPart

If you encounter issues when formatting your system’s hard disk, an external hard drive, or a USB pen drive, you can use DiskPart to wipe them clean. However, please note that you cannot clean the disk on which your operating system is installed.

If you need to wipe out an entire hard disk using Diskpart, follow these steps with caution:

  • Type list disk and note the disk number you want to wipe.
  • Select the disk by typing select disk <number> .
  • Now type the clean all command and press Enter. This command will erase all data on the selected disk. Be patient; depending on the size of your hard disk, it could take even hours to complete this command.

Clean Disk Using Diskpart

Alternatives to Diskpart

While Diskpart is a powerful tool for managing hard drive partitions in Windows 11/10, there are alternative methods and third-party tools available for users who prefer different approaches. Here are a couple of alternatives to consider,

Windows Disk Management

Windows Disk Management

Windows provides a built-in graphical tool called “Disk Management.” To access it, right-click on the “Start” button and select “Disk Management.” This tool offers an intuitive interface where you can perform tasks like creating hard drive partitions , formatting, deleting, and resizing them. While it might not offer the same level of command-driven control as Diskpart, it’s user-friendly and suitable for most basic partition management needs.

Third-Party Partitioning Tools

Several third-party partitioning tools are available that provide advanced features and user-friendly interfaces. Tools like EaseUS Partition Master , MiniTool Partition Wizard , and AOMEI Partition Assistant offer capabilities beyond what Diskpart provides, including visual representations of your disk layout, more flexible partition resizing, and better data protection during operations. These tools can be especially useful for users who prefer not to work with command-line utilities.

Can Diskpart commands be undone?

Unfortunately, Diskpart commands are irreversible and can lead to data loss if executed incorrectly. It’s crucial to double-check your commands and backup your data before making any changes using Diskpart.

Can I use Diskpart on external drives and USB devices?

Yes, Diskpart can be used on internal and external drives, including USB devices. However, exercise caution and make sure you select the correct disk to avoid accidental data loss.

Is it possible to resize volumes using Diskpart?

Yes, resizing the volume is possible using the Diskpart shrink and extend commands.

Manage your system hard drive easily

Effective hard drive management is essential for maintaining a well-organized and optimized computer system. Diskpart provides a versatile and powerful solution for managing hard drive partitions in Windows 11/10. By understanding its commands and following the steps outlined in this guide, you can confidently create, extend, delete, and manage partitions according to your needs. Remember to exercise caution, back up your data, and double-check your actions before executing Diskpart commands. With this knowledge, you’ll be well-equipped to make the most of your disk space while ensuring the safety of your data.

Looking for more? Check out these OnMSFT.com posts on Diskpart .

Voice Access comes to Windows 11 OOBE in recent Insider builds

Microsoft president demands ‘human oversight’ on ai to avert ‘weaponization’.

OnMSFT.com is built on:

Wordpress GeneratePress Azure

Theme thanks to heather.

command prompt diskpart assign drive letter

Home About Contact Us

Join our team, © copyright 2014 - 2024 onmsft.com llc.

  • All about AI
  • Google Bard
  • Inflection AI Pi Chatbot
  • Anthropic Claude
  • Generative AI
  • AI Image Generation
  • AI Regulation
  • AI Research
  • Large Language Models (LLM)
  • Surface Pro
  • Surface Laptop
  • Surface Book
  • Surface Duo
  • Surface Neo
  • Surface Studio
  • Surface Hub
  • Surface Pen
  • Surface Headphones
  • Surface Earbuds
  • About WinBuzzer
  • Follow Us: PUSH, Feeds, Social
  • Write for Us
  • Cookie Policy and Privacy Policy
  • Terms of Service

How to Assign / Change Drive Letter in Windows 10

We show you how to change the drive letter in CMD, DIsk Management, PowerShell, and Registry editor in Windows 10.

https://winbuzzer.com/2020/08/07/bitlocker-for-windows-10-how-to-use-encryption-for-system-disk-partitions-or-any-other-drive-xcxwbt/

  • 1 How to Change Drive Letter in Windows 10 via Disk Management
  • 2 How to Change Drive Letter in CMD using a DISKPART Disk Management Command
  • 3 How to Change Drive Letter in Windows 10 with a PowerShell Disk Management Command
  • 4 How to Change / Assign a Drive Letter via the Registry Editor

Windows 10 helpfully assigns drive letters to disks as they're added, but they aren't always the most logical choices. While we all know that C: is the system drive, it doesn't make quite as much sense to have D: as your games drive or E: as your media drive. Luckily it's quite easy to change a drive letter in Windows 10, and we're going to walk you through the process today.

How does Windows 10 drive letter assignment work?

For the most part, Windows 10 automatically assigns letters to drives as they're connected, in alphabetical order. However, there are a few exceptions to this rule that may leave some users confused.

As mentioned earlier, C: is always reserved for the system drive, but A: and B: are reserved too, for rarely used floppy drives. Because of Windows automatic assignment, you may have also noticed that Windows changes the drive letter of your USB stick if you've connected another before it.

If you want letters that are easier to identify in bios or don't want your USB letters jumping around, it's quite easy to permanently change a drive letter in Windows 10 to something of your choosing. We're going to cover a few different ways today, including how to change the drive letter in CMD.

How to Change Drive Letter in Windows 10 via Disk Management

The most user-friendly way to assign drive letters in Windows is through the Disk Management interface, which is relatively easy to use.

Start - Disk Management

How to Change Drive Letter in CMD using a DISKPART Disk Management Command

Though it's not quite as user-friendly, it can be much faster to change a drive letter with Command Prompt.

Windows 10 - Open Elevated Command Prompt

How to Change Drive Letter in Windows 10 with a PowerShell Disk Management Command

Those more familiar with PowerShell can use this method instead to achieve the same result.

Windows 10 - Open PowerShell as Admin

How to Change / Assign a Drive Letter via the Registry Editor

Alternatively, if none of the above methods worked or you're just feeling brave, you can modify the drive letter via the registry. Just be sure to read our safe registry editing guide first.

Windows 10 - Open Registry Editor

If you enjoyed this guide, you may want to consider enabling or disabling disk caching or turning on BitLocker for your newly customized drives.

  • Assign drive letter
  • assign drive letter windows 10
  • Change boot drive letter Windows 10
  • Change drive letter windows 10
  • change usb drive letter Windows 10
  • DIsc Management
  • Disk management command
  • how to change drive letter Windows 10
  • powershell change drive letter
  • win 10 change drive letter

Recent News

command prompt diskpart assign drive letter

Microsoft Edge Releases Patch for Data Import Glitch Amidst Unauthorized Data...

command prompt diskpart assign drive letter

Microsoft Announces Retirement of Azure IoT Central Service by 2027

command prompt diskpart assign drive letter

Microsoft Loop Enhances User Experience with Figma Integration

command prompt diskpart assign drive letter

Microsoft 365 Announces End of Life for Publisher by 2026

Subscribe to WinBuzzer on Google News

command prompt diskpart assign drive letter

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

Tutorial on Diskpart Assign Drive Letter in Windows 11/10/8/7 [Detailed Guide]

command prompt diskpart assign drive letter

Sherly updated on Jan 11, 2024 | Home > Computer Instruction

On this page, you can learn a detailed guide on Diskpart assign drive letter and a professional alternative to Diskpart:

How can we use Diskpart to assign a drive letter? This article guides you on Diskpart to assign a drive letter and provides a professional alternative to Diskpart, but first, let's learn more about Diskpart.

What Is Diskpart

Diskpart  is a free command line utility that handles Windows OS commands to perform many disk partitioning tasks via different command lines. It was introduced in Windows 2000 and is the successor to fdisk. As it was introduced, Diskpart is a disk partitioning utility that helps experienced professional Windows users manage their storage devices. 

diskpart interface

As you know, Windows assigns drive numbers to all available drives on the computer, such as optical drives, internal hard drives, SD cards, and external USB drives. A drive letter is a letter identifier for one volume, and each drive letter can be used once on the computer.

And some users with computer experience may assign drive numbers via  Diskpart commands . So next, let's see how we can use Diskpart to assign a drive letter.

Full Guide on Diskpart Assign Drive Letter - Complex

Diskpart is a command line tool that allows you to quickly manage disks or partitions from a command prompt. It can create, delete, extend, or shrink a partition. But how to assign a drive letter via Diskpart? Next, I will show you how to use Diskpart to  change drive letter .

Step 1.  Press Windows + S at the same time to run the search box. Then type cmd. When the command prompt window appears, right-click it and choose "Run as administrator."

Step 2.  Type  diskpart  in the command prompt windows and press Enter.

Step 3. Then, type the following commands, and don't forget to press Enter after you type one command:

  • list volume
  • select volume 4 (Replace 4 with the correct number)
  • assign letter=H

cmd assign drive letter

In this way, you can assign a drive letter to your partition and still use Diskpart commands to extend a partition or delete a partition. However, sometimes you may encounter problems, such as " Diskpart failed to extend the volume " or"Diskpart  can't change drive letter ."

So, to avoid these errors, a professional disk management tool is needed to help you, EaseUS Partition Master. Next, let's see how it helps us.

Professional Alternative for Diskpart Assign Drive Letter - Easy

Diskpart is not perfect because it has limitations. Fortunately, there is a simpler way to perfectly compensate for their shortcomings.

EaseUS Partition Master Professional is a utility third-party partition manager. It supports users in assigning disk partitions through a clear interface that can be finished with just a few clicks. And it is much easier than Diskpart. Moreover, it can assign drive numbers on various  file system types . What's more, it is more functional and allows you to manage your disks. Now, download it and follow the guide to assign a drive letter via EaseUS Partition Master.

 Windows 11/10/8/7  100% Secure

Step 1.  Run EaseUS Partition Master, right-click the target partition, and choose "Change Drive Letter".

Step 2.  In the new window, click the down arrow and choose a drive letter for the partition from the drop-down menu, then click "OK".

Step 3.  Click the "Execute 1 Task(s)" button in the top-left corner, check the changes, and click "Apply" to change the drive letter of the selected partition.

Besides, it can do far more than assigning a drive letter. So now, let's learn more features about it.

Features of EaseUS Partition Master:

  • Resize disk partitions
  • Create or delete partitions
  • Split or  merge partition on SSD
  • Move unallocated space to C drive
  • Assign drive letters on various file system
  • Windows 11/10/8.1 and  Windows 7 extend partition

Hence, download EaseUS Partition Master to help you to solve any problems with your  disk partition . Its clear interface will make it easy to use, so don't worry and download it to help.

Do you know how to use Diskpart to assign drive letters? This part provides two ways to assign a drive letter. If you are a user with a lot of computing experience, Diskpart is probably the fastest way to assign disk characters. However, if you are a normal user or don't know much about computer operation, EaseUS Partition Master is the right choice. 

You may like the following content:

By the way, the next part shows several questions related to Diskpart. Continue to read if you would like to learn more.

Diskpart Assign Drive Letter FAQs

You have learned to use Diskpart to assign a drive letter and a professional alternative to Diskpart. This paragraph shows you several frequently asked questions. If you have similar problems, continue to read.

1. How do I assign a drive letter without formatting?

First, open Diskpart by typing diskpart in the Command Prompt window.

Then, type the following commands in the Diskpart window:

  • select volume 1

Remember to hit enter each time you type a command and replace one and H with the correct number and the letter you like.

2. What does diskpart assign do?

Diskpart can assign a drive letter to your volume. If you want to change the drive letter or the original drive letter doesn't work, you can use Diskpart commands to assign a new drive letter.

3. Can I assign drive letter B?

No, you can't. Letter A and letter B are for floppy drives. And the letter C is usually for the system partition. So you can choose a letter from D to Z for your drive.

Was This Page Helpful?

command prompt diskpart assign drive letter

Updated by Daisy 

Daisy is the Senior editor of the writing team for EaseUS. She has been working at EaseUS for over ten years, starting as a technical writer and moving on to being a team leader of the content group. As a professional author for over ten years, she writes a lot to help people overcome their tech troubles.

Read full bio

command prompt diskpart assign drive letter

Written 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. She has written over 200 articles to help people overcome computing issues.

Related Articles

Fix Error Code 1309 Mac [2024 Guide]

author icon

Low Level Format VS Standard Format, What's the Differences and Which to Use?

9 Best Solutions to Fix Windows Stop Code 0xC000021A

author icon

10 Fixes to Solve Chromebook Black Screen [2024 Guide]

author icon

EaseUS Data Recovery Services

Request a free evaluation >>

EaseUS data recovery experts have uneaqualed expertise to repair disks/systems and salvage data from all devices like RAID, HDD, SSD, USB, etc.

command prompt diskpart assign drive letter

Copyright ©   EaseUS. All rights reserved.

  • Backup & Recovery
  • Hard Disk Manager
  • HFS+ for Windows
  • ExtFS for Windows
  • Disk Wiper Professional
  • Drive Copy Professional
  • Migrate OS to SSD
  • Paragon Alignment Tool Professional
  • NTFS for Mac
  • Hard Disk Manager for Mac
  • ExtFS for Mac

command prompt diskpart assign drive letter

Assign, change or remove Drive Letter with Diskpart

Diskpart is very powerful Windows Utility, which allows certain number of operation with hard disk. In this article we will show you how to assign, change or remove drive letter with Diskpart using.

Windows-10-x64-Original-2016-09-05-14-24-29

You bought hard drive for Backup, but it has automaticaly gained letter D . You want to change it to E . First we need to open Command Prompt with Administrator Rights.

Type cmd into the search box, and then right-click and choose Run as administrator. If you have Windows 10 use the CTRL + SHIFT + ENTER keyboard shortcut on Screen 1 , or click on Start with right click and choose Command Prompt (Admin) on Screen 2 .

cp001

When Command Prompt pops up, run the diskpart command.

run_dpt

Now we type list volume to list our volumes, we need to know the number of our volume.

list_vol

In our case our hard drive is Volume 3 and that number is 3 .

Now we use command select volume 3 to make changes to that volume. If your volume number is different, you need to replace number  3 with the number from your volume. After we have selected our volume we use command assign letter E , to assing letter E to our volume.

asn_let

Now you know how to change or assign another letter to your volume, also if you need you can remove volume letter with command remove letter E

rem_let

For security reasons you cannot change or remove your current system disk letter (esp C ), it will not work.

To exit diskpart type in exit .

exit

Enter your email and receive updates about special offers and exclusive content!

Connect with us for giveaways, exclusive promotions and last news!

command prompt diskpart assign drive letter

  • Test Automation
  • Performance Testing
  • Cyber Security Testing
  • ETL Testing
  • Multilingual NLP Assurance
  • Mobile App and Web Testing
  • IV&V and Regulatory Assurance
  • PoS Testing
  • Accessibility Testing
  • Service Virtualization
  • XR Assurance
  • Digital Assurance
  • Cloud Migration Testing
  • IoT Assurance
  • Drone Assurance
  • Storm Readiness Testing
  • Real-Time Systems
  • Test Environment Management
  • Testing of AI
  • Other ERP Packages
  • Google Cloud
  • AI Data Services
  • Mobile and Web Dev
  • DevOps Transformation
  • Serverless Cloud Native Development
  • Cloud Transformation and Migration Strategy
  • API Integration Services
  • Business AI
  • Modeling Optimization
  • Data Governance Services
  • Learning Platform Development
  • Video Encoding, Streaming and Player Development
  • Instructional Design
  • Content Remediation Services
  • Medical Devices
  • Retail & Consumer Goods
  • Banking & Financial Services
  • Capital Markets
  • Media & Entertainment
  • Managed Testing Services
  • Managed Crowd Testing
  • Project-Based Testing
  • Strategic Consultancy
  • Global Delivery
  • Risk-Based Testing
  • Test.Predictor
  • Test.Consolidator
  • Keysight Technologies
  • White Papers
  • Case Studies
  • Podcast: The Testing Show
  • Technical Hub
  • Categories & Tags
  • Leadership Team
  • Diversity & Inclusion

How to assign a drive a letter using Diskpart

Industries top insights, delivered to your inbox.

Introduction:

Windows volume drive letters can be altered from the command line using Diskpart.

Requirements:

Access to the Windows command line.

From your taskbar, start a search for

Enter the command:

Example output:

but replace “2” with the desired volume number. Enter the command:

but replace the “q” with any desired letter that is not already being used by another volume.

More Information:

within  diskpart  for more information.

New call-to-action

Other Technical Hub

Introduction: CSV files, or comma-separated-files, are used for storing data. They are a very commonly used text file format. Requirements:…

Introduction: Most SQL tables are non-temporary. Temporary tables can be used as well for convenience, or special purposes. Requirements: An…

Introduction: Relational Databases using SQL (Structured Query Language) may have a need for certain operations to be performed, or triggered,…

Want to talk with a test automation expert?

command prompt diskpart assign drive letter

How to Activate Missed Call Alert on Airtel Kenya

Safaricom 5g vs airtel kenya 5g: how do they compare which should you get, airtel voice bundle expiry: the truth behind the disappearing voice bundles, kabokisi emerges as champion in mtn uganda's momo hackathon 2023, from mifi woes to fiber wonders: how covid 19 unleashed uganda's unlimited home internet revolution, 10 practical settings to boost your pixel smartphone experience, 10 settings you should change on your redmi smartphone, [updated] redmi note 13 series in kenya: here's pricing and availability, m-pesa tightens security: no more transfers to unregistered accounts, best password managers for android in 2024, disable video and audio ad autoplay on firestick, setup and personalize roku remote shortcuts on roku remote pro, these are the best bluetooth speaker under ksh 10,000 to buy in kenya in 2024, oraimo bass go boom wants to give you premium party sound on a budget, sony wh-ch510 review: budget pick with big battery & balanced audio, mtn momo users can now access savings and loan service via *165*5# menu, how to pay engineers board of kenya subscription fee in 2024, here are the updated m-pesa transaction charges in 2024, m-pesa customer care: here's how to get in touch, ura introduces ussd code *285# for tax payments and tin services, enable continuous recording to microsd card on wyze cams, firefox relay⁩ is your answer to spam mail and a messy inbox, google chrome gets ai features to help organise tabs, generate themes and write better, how to run windows programs or .exe files using wine on chromebook, how to enable or disable autoscrolling in final cut pro, watch twitter or x videos on your tv, how to create songs using ai through microsoft copilot, trying out the new ai art generator in canva, send yourself files on whatsapp, how to maximise the battery life of your pixel watch, anker soundcore p20i true wireless earbuds: bass-boosted budget buds, why apple is temporarily stopping the sales of select apple watches, how to view the wyze cam livestream on google home, pixel watch december feature drop: here's what's new in this update.

command prompt diskpart assign drive letter

  • Privacy Policy
  • Terms of Use

command prompt diskpart assign drive letter

How to Format a Drive Using Command Prompt and DiskPart

command prompt diskpart assign drive letter

Have you ever encountered a situation where you need to format a drive but the traditional methods seem to fail? Fear not, as in this guide, we will explore an alternative way to format a drive using Command Prompt and DiskPart. While it may sound intimidating, this method offers more control and flexibility, allowing you to perform advanced formatting options. So, let’s dive in and discover how to format a drive using these powerful command-line tools.

Understanding Command Prompt and DiskPart

Before we proceed with the formatting process, it’s essential to understand the tools we’ll be using. Command Prompt is a command-line interpreter that allows you to interact with your computer by typing commands. It provides a way to execute various tasks, such as managing files, running programs, and configuring system settings.

DiskPart, on the other hand, is a command-line disk partitioning utility that enables you to manage storage devices, including formatting drives, creating partitions, and assigning drive letters.

Related: How to format USB drive or Memory card on Chromebook

When using Command Prompt and DiskPart, it’s important to exercise caution as any incorrect commands or operations can lead to data loss. Make sure to double-check your commands and back up any important data before proceeding.

Now that we have a basic understanding of the tools involved, let’s move on to the next section to learn how to format a drive using Command Prompt and DiskPart.

Formatting a Drive Step-by-Step

Step 1: open command prompt.

To begin, open Command Prompt by pressing the Windows key + R, typing “cmd” in the Run dialog box, and hitting Enter. This will launch the Command Prompt window.

Step 2: Launch DiskPart

In the Command Prompt window, type “diskpart” and press Enter. This will start the DiskPart utility, and you’ll see a new prompt that says “DISKPART>” .

command prompt diskpart assign drive letter

Step 3: List Available Disks

Type “list disk” in the DiskPart prompt and press Enter. This command will display a list of all the disks connected to your computer.

command prompt diskpart assign drive letter

Related: How to Correctly Format a USB Drive for Your TV

Step 4: Select the Drive to Format

Identify the disk number of the drive you want to format from the list. For example, if you want to format disk 1, type “select disk 1” and press Enter. Be sure to select the correct drive(flash) by checking its storage, you can insert & re-insert to be sure.

command prompt diskpart assign drive letter

If you list again ( list disk ), it will have an asterisk before it; list disk

command prompt diskpart assign drive letter

Step 5: Clean the Drive

Once you’ve selected the disk to format, type “clean” and press Enter. This command will remove all partitions and volumes on the selected drive, effectively wiping its content.

command prompt diskpart assign drive letter

Step 6: Create a New Partition

Next, type “create partition primary” and press Enter. This command will create a new primary partition on the drive. This allows us to be able to store data or information on the drive.

command prompt diskpart assign drive letter

Step 7: Format the Partition

To format the newly created partition, type “format fs=ntfs” and press Enter. You can replace “ntfs” with “fat32” or any other desired file system, depending on your requirements. This will take some good time since we are not using the faster option;

Step 8: Assign a Drive Letter

To assign a drive letter to the formatted partition, type “assign letter=X” (replace “X” with your desired drive letter) and press Enter. This will make the drive accessible through the assigned letter in File Explorer.

Step 9: Exit DiskPart

Finally, to exit DiskPart, type “exit” and press Enter. You can now close the Command Prompt window.

Wrapping Up

Formatting a drive using Command Prompt and DiskPart may seem complex at first, but once you understand the process, it becomes a powerful tool for managing your storage devices. Remember to exercise caution and double-check your commands to avoid any unintended data loss. Do let us know in the command section if you have found this article helpful.

LIKE WHAT YOU ARE READING?

Sign up to our newsletter for expert advice and tips of how to get the most out of your tech gadgets.

Subscribing to our newsletter indicates your consent to our Terms of Use and Privacy Policy . You may unsubscribe from the newsletters at any time.

Related Stories

command prompt diskpart assign drive letter

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Mount a drive in a folder

  • 8 contributors
Applies To: Windows 11, Windows 10, Windows Server 2022, Windows Server 2019, Windows Server 2016

You can use Disk Management to mount (make a drive accessible) in a folder rather than a drive letter. It looks like just another folder. You can mount drives only in empty folders on basic or dynamic NTFS volumes.

You must be a member of the Backup Operators or Administrators group to mount a drive or remove a mount point.

Mount a drive in an empty folder

You can mount a drive in an empty folder using Disk Management or the command line.

Before you start

Create an empty folder . You need to create a new empty folder and store it on an NTFS or ReFS drive.

Review the terms . To help you navigate the steps, here are terms used throughout this article.

Mount a drive as a folder with Disk Management

In the search box on the taskbar, enter Computer Management , and select Disk Management .

Choose the partition or volume that has the folder you want to mount the drive.

Go to Action > All Tasks > Change Drive Letter and Paths , then choose Add .

Select Mount in the following empty NTFS folder option.

Select the Browse button to locate the folder.

After you select the folder, choose select OK .

Select OK in the Change Drive Letter and Paths dialog box to finish.

Mount a drive as a folder with the command line

Open a command prompt and type diskpart .

At the DISKPART prompt, type list volume , and select Enter . Make note of the volume number of the drive you want to mount to the folder.

At the DISKPART prompt, type select volume <volumenumber> , and select Enter . Make sure to specify the volume number in the command. For example: select volume 5

At the DISKPART prompt, type assign [mount=<path>] , and select Enter . Make sure to specify the full path in the command. For example: assign mount="C:\Users\Smith\Desktop\Demo Drive"

Close command prompt.

Remove a mount point

To remove the mount point so that the drive is no longer accessible through a folder, do the following steps.

Open Disk Management. In the search box on the taskbar, enter Computer Management , and select Disk Management

Choose the drive mounted to the folder, then choose Change Drive Letters and Paths .

Go to Action > All Tasks > Change Drive Letter and Paths .

Select the folder from the list, and then choose Remove .

Additional considerations

  • If you're administering a local or remote computer, you can browse NTFS folders on that computer.
  • Mount point folder paths are available only on empty folders on basic or dynamic NTFS volumes.
  • To modify a mount point folder path, remove it, and then create a new folder path using the new location. You can't modify the mount point folder path directly.
  • When assigning a mount point folder path to a drive, use Event Viewer to check the system log for any Cluster service errors or warnings indicating mount point folder path failures. These errors display as ClusSvc in the Source column and Physical Disk Resource in the Category column.
  • You can also create a mounted drive using the mountvol command.
  • Command-line syntax notation

Submit and view feedback for

Additional resources

MiniTool

  • Disk & Data Manager
  • Partition Wizard
  • Power Data Recovery
  • ShadowMaker
  • Media Toolkit
  • uTube Downloader
  • Video Converter
  • Download Partition Wizard Free Edition: Download Pro Edition: Try Demo Server Edition: Try Demo

Diskpart Unassign Drive Letter in Windows 11/10 [Full Guide]

Diskpart is a well-known Windows built-in disk partition utility used to format /create/delete partitions,  online/offline disk , wipe disks, etc. However, a lot of users are unclear about how to use this utility. For example, here a user posted a question about how to change drive letter diskpart on the answers.microsoft.com forum:

Is there a way to unassign drive letter diskpart? Windows will not assign a drive letter automatically when I inserted a Windows installation media. https://answers.microsoft.com/en-us/windows/forum/all/manually-assigning-a-drive-letter-using/bbb3baf6-cda4-4d06-b431-eae9e975a5c7

How to Unassign Drive Letter Diskpart in Windows 11/10

A drive letter is a single alphabetic character from A to Z assigned by Windows to a drive or partition connected to the computer. Sometimes, you may need to change drive letter diskpart in some situations. How to let diskpart unassign letter in Windows 11/10? Here are detailed steps:

If you remove the drive letter from a partition, it will no longer show as a drive in  File Explorer  and the unassigned drive letter can be available to other partitions.

Step 1.  Press  Win + R  keys to open the  Run  dialog box, and then type  diskpart  in it and press  Enter . Then click on  Yes  to open the tool in Command Prompt.

type diskpart in the Run box

Step 2. To let diskpart unassign drive letter, type the following commands in order and press Enter after each one.

  • list volume
  • select volume * (replace * with the partition number you want to remove its drive letter from)
  • remove letter=K (replace K with the drive letter that you want to remove)

remove drive letter

The process of diskpart assign letter is very simple and similar to removing a drive letter. To assign drive letter diskpart, you can open the Command Prompt window again as we explained above, type the following commands in order and press Enter after each one.

  • select volume 10
  • assign letter=k

diskpart assign drive letter

Although Diskpart is a practical partition manager in Windows, sometimes this utility can run into various errors such as “ DiskPart failed to clear disk attributes ”, “ Diskpart virtual disk service error ”, “failed to assign a drive letter”, etc. Is there an alternative to diskpart unassign drive letter? Of course, yes! Let’s keep reading.

Best Alternative to Diskpart Remove Drive Letter

If you can’t change drive letter CMD or Diskpart, MiniTool Partition Wizard is the best alternative. It is a trustworthy and comprehensive partition manager that allows you to change drive letters easily. Besides, this partition software can be used to extend/resize/hide/copy/format partitions, migrate OS , convert FTA to NTFS without data loss , change cluster size, recover lost data , and more.

MiniTool Partition Wizard Free Click to Download 100% Clean & Safe

Step 1. Launch the program to enter its main interface, right-click the partition, and select Change Letter from the pop-up menu.

diskpart assign drive letter

Step 2. If you want to remove the drive letter, select None from the New Drive Letter drop-down menu and click on OK to save the change. Alternatively, you can select a new drive letter from the drop-down menu to assign a drive letter for the partition.

Step 3. Click on Apply to execute the change.

unassign drive letter using MiniTool

If you just want to hide the partition in File Explorer rather than remove the drive letter, you can select the partition and click Hide Partition > Apply from the left action panel.

select Hide Partition using MiniTool

How to make diskpart remove drive letter in Windows 11/10? All detailed steps have been illustrated. Now, you can change drive letter using diskpart/CMD. If it doesn’t work, you can use a better alternative – MiniTool Partition Wizard.

About The Author

Ariel

Position: Columnist

User Comments :

The Best Windows Disk Partition Manager and PC Optimizer

command prompt diskpart assign drive letter

  • Free Partition Software >

BitLocker Protection Status Off but Encrypted? How to Fix?

BitLocker protection status off does indeed means suspension protection is turned on. Read this article to set BitLocker protection status to “on” and get an easier way to manage your BitLocker.

Hedy

By Hedy / Updated on February 19, 2024

twitter

What does BitLocker protection status off mean?

"During a large scale bitlocker deployment on laptops, many endpoints respond with a bitlocker protection status set to off, although encryption is set to on. What scenario would cause this?"

BitLocker is a full-disk encryption feature included with Microsoft Windows operating systems. When the BitLocker protection status off but encrypted, it generally means that BitLocker has been suspended, so the drive is not currently protected by BitLocker encryption. This can pose a security risk as the data on the drive is not safeguarded.

Several reasons could lead to BitLocker being turned off:

User-initiated action: A user or administrator might have manually turned off BitLocker  protection.

Maintenance or upgrades:  BitLocker protection might be turned off temporarily during system maintenance, updates, or upgrades to avoid potential issues.

Issues or errors: If there are issues with the system or the BitLocker configuration, it might automatically disable protection to prevent data loss or other complications.

Group Policy changes: If there are changes to Group Policy settings, it could affect BitLocker protection status.

Encryption process incomplete:  If the initial encryption process is not completed successfully, BitLocker protection may remain off until the process is successfully completed.

It's important to note that the exact steps to enable or disable BitLocker can vary depending on the Windows version and edition. If you encounter BitLocker protection being off and you didn't intentionally disable it, it's advisable to investigate the cause and take appropriate action to ensure the security of your data.

How do I turn on BitLocker protection status?

Once the BitLocker protection status is set to “off”, you can resume it to “on” by the following three ways.

Way 1. Resume BitLocker protection in Manage BitLocker

Step 1. Click on the Start Menu. In the search box, type "Manage BitLocker", then hit Enter to open the Manage BitLocker window.

Step 2. Navigate to the desired drive with protection status off BitLocker and click "Resume protection" for it.

Way 2. Resume BitLocker protection via Command Prompt

Step 1. Type cmd on the search bar and select Command Prompt to run it as administrator.

Step 2. Then, type the command below in the elevated command prompt, hit Enter.

manage-bde -protectors -enable X:

Replace X  in the command above with the real drive letter of the encrypted drive you want to resume BitLocker protection for. For example:

manage-bde -protectors -enable E:

Step 3. Then exit the command prompt environment, and you can check the status of BitLocker for the drive at any time.

Way 3. Turn on BitLocker protection via PowerSell

Step 1. Right-click on the Start button and select "Windows PowerShell (Admin)".

Step 2. For specific “BitLocker protection status off” drive, use the command:

Resume-BitLocker -MountPoint "X:"

Replace X in the commands above with the actual drive letter of the unlocked encrypted drive. For example:

Resume-BitLocker -MountPoint "C:"

An easier way to keep BitLocker protection status on

Although encountering Windows 10 BitLocker protection status off is annoying, you can follow the above methods to resume the BitLocker protection on. To prevent this from happening again, it’s highly recommended to use a reliable and powerful BitLocker tool like  AOMEI Partition Assistant Professional  to manage your encrypted drives.

This program can run on almost all Windows 11/10/8/7 editions, which is very friendly to Windows Home users. After encrypting your drive using AOMEI Partition Assistant, your data will always be under safe security and you will never find your BitLocker protection status off but encrypted.

Now, let’s have a look at how to protect your hard drive using BitLocker in Partition Assistant:

Step1. Install and launch AOMEI Partition Assistant. Click the "Tools" main tab and select "BitLocker".

Step 2. All drives on the system will be displayed, including operating system drives, fixed data drives, and removable drives. Please find the partition you would like to encrypt BitLocker and click the "Turn on BitLocker" option. (Here, we take the drive D: as an example.)

It only supports encrypting NTFS partitions. Other partition file systems, for example, FAT or FAT32 cannot be encrypted.

Step 3. Please set and confirm a password to encrypt the drive and click "Next".

Step 4. Select a way to back up your recovery key. You can either select "Save to a file" or "Print the recovery key".

Step 5. If you select "Save to a file", please choose a location on your PC to save the recovery key.

Then, please click the "Next" button to start the encryption process.

If you would like to encrypt your current system drive , you will be required to restart your PC to enter into the Windows PE environment.

Step 5. The encryption process might take time to encrypt the drive. Before the process is finished, please do not terminate the program, remove the drive, or turn off the power. Once the encryption process is finished, please click "Completed". Finally, the drive is BitLocker encrypted.

When you find your BitLocker protection status off, it means the encryption This post has introduced three simple yet effective ways to resume it. If you want to keep BitLocker protection status always on, you can apply AOMEI Partition Assistant Professional to take the place of Windows built-in BitLocker utility.

In addition to protecting your data by encrypting the entire drive, AOMEI software also offers other useful features out of security such as cloning hard drive  to external places, migrate OS to HDD or SSD, resetting forgotten password  in time, and more.

Hedy

Related Articles

How to enable bitlocker usb drive on windows 11 [full guide].

Wonder how to use BitLocker USB drive Windows 11 to protect your flash drives? Delve into this tutorial and learn more details on turning on/off BitLocker for USB drives and using an BitLocker encrypted USB drive. An encryption alternative is also introduced.

How to Find BitLocker Recovery Key Windows 10/11

If you don’t know where to find your BitLocker recovery key in Windows 10, you can see various solutions in this post with detailed steps.

How to Clone BitLocker Encrypted Hard Drive [Proven Way]

You can clone BitLocker drive to SSD or HDD in Windows 11, 10, 8, or, 7 via powerful and reliable hard drive cloning software – AOMEI Partition Assistant.

Windows Device Encryption VS BitLocker Encryption

Windows Device Encryption VS BitLockerm which one is better and what difference between them? In this post, you can see how to turn on BitLocker on Windows Home.

Free Download to Try AOMEI Partition Assistant Now

IMAGES

  1. How to assign permanent letters to drives on Windows 10

    command prompt diskpart assign drive letter

  2. How to Assign and Remove Drive Letter with Diskpart in Windows 10 or 11?

    command prompt diskpart assign drive letter

  3. How to Remove and Assign Drive Letters in Windows with Diskpart

    command prompt diskpart assign drive letter

  4. [Free Guide]: Use Diskpart Assign Drive Letter in Windows 11, 10, 8, 7

    command prompt diskpart assign drive letter

  5. Full Guide on Diskpart Assign Drive Letter in Windows 11/10/8/7 [Step

    command prompt diskpart assign drive letter

  6. How to Change/Rename/Assign Drive Letter in CMD Windows 10/7

    command prompt diskpart assign drive letter

VIDEO

  1. How To Format A Drive With Diskpart!

  2. How to Delete Partition or Drive Using CMD (Command Prompt)

  3. Windows 10/11

  4. How to format and/or assign drive letters using Disk Management in Windows 7

  5. Windows10/11/Server登入 忘記密碼怎麼辦

  6. How To Make a Bootable USB Drive Windows Vista/7

COMMENTS

  1. Manually assigning a drive letter using CMD/Diskpart

    Manually assigning a drive letter using CMD/Diskpart [Localization from this article: Manuelles Zuweisen eines Laufwerksbuchstaben mit CMD bzw. Diskpart - Microsoft Community] Technical Difficulty: Expert Applies to: Windows 10 & 11 In some cases, Windows will not assign a drive letter automatically to an inserted drive.

  2. How to Use the Diskpart Utility to Assign and Remove Drive Letters

    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

  3. [Free Guide]: Use Diskpart Assign Drive Letter in Windows 11, 10, 8, 7

    Well, how to use Command Prompt Diskpart assign drive letter? The following parts may help you a lot. Step 1. Press "Windows + R". Then, type "diskpart" and press Enter. Step 2. Type in "list volume" and press Enter. Now, you can see all volumes on PC. Step 3. Type in "select volume 7" and press Enter (here take volume 7 as an example). Step 4.

  4. How to Remove and Assign Drive Letters in Windows with Diskpart

    Assign Drive Letter Using Diskpart Assigning a new drive letter to a partition or removable device using Diskpart is really easy. First, search for the command prompt in the Start menu, right click on it and select the option "Run as administrator."

  5. Diskpart Command (Examples, Options, Switches & More)

    This command will remove the partition currently assigned the drive letter G . Select a Disk diskpart list disk select disk 1 attributes disk clear readonly exit 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.

  6. How to assign permanent letters to drives on Windows 10

    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...

  7. How to use diskpart, chkdsk, defrag and other disk-related commands

    1. How to use diskpart to create a partition from the Command Prompt or PowerShell 2. How to use diskpart to assign a letter to a partition from the Command Prompt or PowerShell 3. How to use diskpart to remove the letter of a partition from the Command Prompt or PowerShell (hide a partition) 4.

  8. Diskpart Commands: How to Manage Hard Drive Partitions in Windows 11/10

    Press Windows + R to launch the Run Command box. Type " cmd " and press Shift+Enter to open the Command Prompt with admin rights. In the Command Prompt, type diskpart and press Enter. This ...

  9. How to Assign / Change Drive Letter in Windows 10

    4 How to Change / Assign a Drive Letter via the Registry Editor. helpfully assigns drive letters to disks as they're added, but they aren't always the most logical choices. While we all know that ...

  10. Full Guide on Diskpart Assign Drive Letter in Windows 11/10/8 ...

    Step 1. Press Windows + S at the same time to run the search box. Then type cmd. When the command prompt window appears, right-click it and choose "Run as administrator." Step 2. Type diskpart in the command prompt windows and press Enter. Step 3. Then, type the following commands, and don't forget to press Enter after you type one command:

  11. Assign, change or remove Drive Letter with Diskpart

    If you have Windows 10 use the CTRL + SHIFT + ENTER keyboard shortcut on Screen 1, or click on Start with right click and choose Command Prompt (Admin) on Screen 2. When Command Prompt pops up, run the diskpart command. Now we type list volume to list our volumes, we need to know the number of our volume.

  12. How to assign a drive a letter using Diskpart

    How to assign a drive a letter using Diskpart Introduction: Windows volume drive letters can be altered from the command line using Diskpart. Requirements: Access to the Windows command line. Procedure: From your taskbar, start a search for cmd Enter the command: diskpart Enter the command: list volume Example output: DISKPART> list vol

  13. Windows diskpart to format, clean and assign drive letter ...

    This video explains how to use diskpart in Windows command prompt. This includes formatting, cleaning and assigning a drive letter to the partition

  14. How To Manually Assign Or Change A Drive Letter Using Command Prompt

    How to change drive letter using cmd/Diskpart on Windows 10/11Type "diskpart"Type "list vol"Select the volume using "sel vol number"Assign the drive letter u...

  15. Diskpart

    Diskpart - Assign drive letters from command line eKiwi-Blog Tutorials English 1.57K subscribers Subscribe Subscribed 59 Share 7K views 2 years ago More on the blog:...

  16. How to Format a Drive Using Command Prompt and DiskPart

    Step 8: Assign a Drive Letter. To assign a drive letter to the formatted partition, type "assign letter=X" (replace "X" with your desired drive letter) and press Enter. This will make the drive accessible through the assigned letter in File Explorer. Step 9: Exit DiskPart. Finally, to exit DiskPart, type "exit" and press Enter. You ...

  17. Using Diskpart to create, delete, clean or extend disk partitions

    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.

  18. Change and Assign Drive Letter in Windows 10

    1 Open an elevated command prompt. 2 Type diskpart into the elevated command prompt, and press Enter. (see screenshot below) 3 Type list volume into the elevated command prompt, and press Enter. 4 Make note of the volume number (ex: 5) for the drive letter (ex: "F") of the drive (volume) you want to change.

  19. How to Permanently Assign Drive Letter with Ease

    Solution #1: Assign a persistent drive letter with Disk Management. 1. Hit Windows Key + X on your keyboard, and select Disk Management from the menu. 2. Right click the USB drive to which you want to assign a persistent drive letter and select "Change Drive Letter and Paths.". 3. In the pop-up window, click "Change". 4.

  20. Assign a mount point folder path to a drive.

    Select OK in the Change Drive Letter and Paths dialog box to finish. Mount a drive as a folder with the command line. Open a command prompt and type diskpart. At the DISKPART prompt, type list volume, and select Enter. Make note of the volume number of the drive you want to mount to the folder.

  21. Diskpart Unassign Drive Letter in Windows 11/10 [Full Guide]

    Step 1. Press Win + R keys to open the Run dialog box, and then type diskpart in it and press Enter. Then click on Yes to open the tool in Command Prompt. Step 2. To let diskpart unassign drive letter, type the following commands in order and press Enter after each one. list volume.

  22. BitLocker Protection Status Off but Encrypted? How to Fix?

    Step 1. Type cmd on the search bar and select Command Prompt to run it as administrator. Step 2. Then, type the command below in the elevated command prompt, hit Enter. manage-bde -protectors -enable X: Replace X in the command above with the real drive letter of the encrypted drive you want to resume BitLocker protection for. For example: