Sign up for our daily newsletter

  • Privacy Policy
  • Advertise with Us

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.

A man an a cat watching a red universe through a window

How-To Geek

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

4

Your changes have been saved

Email Is sent

Please verify your email address.

You’ve reached your account maximum for followed topics.

This New Android 15 Feature Is Going to Save My Battery Life

Change these hidden settings to speed up your android phone, 10 years later, i'm still using this popular android automation app.

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.

delete drive letter assignment

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.

delete drive letter assignment

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.

delete drive letter assignment

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.

delete drive letter assignment

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.

delete drive letter assignment

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

  • Maintenance & Optimization
  • Command Prompt & PowerShell

How to remove drive letter on Windows 11

Here are four simple methods to remove a drive letter on Windows 11.

Avatar for Mauro Huculak

  • To remove a drive letter on Windows 11, open Settings > System > Storage > Advanced storage settings > Disks & volumes , open the storage properties, click “Change Drive Letter,” and choose the “None” option to remove the letter.
  • You can also use the Disk Management app or complete this configuration through Command Prompt and PowerShell.

On Windows 11 , you can remove a drive letter in at least four ways, and in this guide, you will learn how. The operating system automatically assigns a drive letter to every device storage connected to the computer, including internal drives, USB drives, DVD or Blu-ray devices, and mapped network drives to register the logical volume and present them to you on File Explorer or any other app. 

However, sometimes, you may need to remove a drive letter for various reasons. For example, you may want to keep the drive hidden for security reasons, or the system mistakenly assigns letters to the hidden recovery or EFI partitions. You may also need to change the drive letter to resolve conflicts or duplicates .

Whatever the reason, on Windows 11, you can remove a drive letter in at least four ways using the Settings app, Disk Management, Command Prompt, and PowerShell.

In this guide , I will teach you how to remove a drive letter on Windows 11.

Remove drive letter from Settings app

Remove drive letter from disk management, remove drive letter from command prompt, remove drive letter from powershell.

To remove the drive letter on Windows 11, use these steps:

Open Settings on Windows 11.

Click on System .

Click the Storage page.

Click the “Advanced storage settings” option under the “Storage management” section.

Click the Disks & volumes setting.

Disks & volumes

Select the drive with the volume with the letter to remove.

Select the volume and click the Properties button.

Volume properties

Click the “Change drive letter” button.

Change drive letter

Select the None option to remove the drive letter on Windows 11.

Remove drive letter

Click the OK button.

Once you complete the steps, the system will remove the drive letter on Windows 11.

To remove the drive letter from Disk Management, use these steps:

Open Start .

Search for Create and format disk partitions and click the top result to open the Disk Management tool.

Right-click the volume and select the “Change Drive Letter and Paths” option.

Change drive letter and path

Select the drive letter and click the Remove button.

Disk Management remove drive letter

After completing the steps, the drive will no longer appear in File Explorer.

To add a new drive letter from Command Prompt, use these steps:

Search for Command Prompt , right-click the result, and select the Run as administrator option.

Type the following command to launch diskpart and press Enter :

Type the following command to list the volumes and press Enter :

Type the following command to select the volume (drive) to remove the letter and press Enter :

In the command, change “4” for the number corresponding to the storage to remove the letter.

Type the following command to remove the drive letter on Windows 11 and press Enter :

In the command, change “E” for the letter to remove.

Command Prompt remove drive letter

Once you complete the steps, the diskpart tool will letter for the volume.

To remove a drive letter from PowerShell, use these steps:

Search for PowerShell , right-click the result, and select the Run as administrator option.

Type the following command to identify the hard drive and press Enter :

Type the following command to identify the partition to remove the drive letter and press Enter :

In the command, change “4” with the disk number to remove the letter.

Type the following command to remove the drive letter and press Enter :

PowerShell remove drive letter

In the command, change “4” with the disk number and “2” for the partition holding the drive letter. Also, change “E” for the drive letter to remove.

After completing the steps, PowerShell will remove the letter for the drive, making it inaccessible.

Update May 15, 2024: This guide has been updated to ensure accuracy and reflect changes to the process.

Avatar for Mauro Huculak

Mauro Huculak is a Windows How-To Expert who started Pureinfotech in 2010 as an independent online publication. He has also been a Windows Central contributor for nearly a decade. Mauro has over 14 years of experience writing comprehensive guides and creating professional videos about Windows and software, including Android and Linux. Before becoming a technology writer, he was an IT administrator for seven years. In total, Mauro has over 20 years of combined experience in technology. Throughout his career, he achieved different professional certifications from Microsoft (MSCA), Cisco (CCNP), VMware (VCP), and CompTIA (A+ and Network+), and he has been recognized as a Microsoft MVP for many years. You can follow him on X (Twitter) , YouTube , LinkedIn and About.me . Email him at [email protected] .

  • Winpilot and OFGB apps make it easier to block ads on Windows 11
  • How to show file extensions on Windows 11

We hate spam as much as you! Unsubscribe any time Powered by follow.it ( Privacy ), our Privacy .

  • 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

delete drive letter assignment

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!

delete drive letter assignment

Windows 11 Forum

  • Search forums

Follow along with the video below to see how to install our site as a web app on your home screen.

Note: This feature may not be available in some browsers.

  • Windows Support Forums

Devices   Remove Drive Letter in Windows 11

  • Thread starter Brink
  • Start date Nov 11, 2022
  • Nov 11, 2022

delete drive letter assignment

You must be signed in as an administrator to remove a drive letter. Assigned driver letters are referenced in this registry key: HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices

  • Option One: Remove Drive Letter in Disk Management
  • Option Two: Remove Drive Letter in Settings
  • Option Three: Remove Drive Letter using "diskpart" command
  • Option Four: Remove Drive Letter using "mountvol" command
  • Option Five: Remove Drive Letters of Previously Connected Drives using "automount scrub" command
  • Option Six: Remove Drive Letters of Previously Connected Drives using "mountvol" command

Remove Drive Letter in Disk Management

delete drive letter assignment

Remove Drive Letter in Settings

delete drive letter assignment

Remove Drive Letter using "diskpart" command

Substitute <volume number> in the command above with the actual volume number (ex: "5") from step 4 for the drive letter (ex: "T") you want to remove. For example: select volume 5

Substitute <drive letter> in the command above with the actual drive letter (ex: "T") you want to remove. For example: drive letter= T

delete drive letter assignment

Remove Drive Letter using "mountvol" command

learn.microsoft.com

Substitute <drive letter> in the command above with the actual drive letter (ex: "T") you want to remove. For example: mountvol T : /d

delete drive letter assignment

Remove Drive Letters of Previously Connected Drives using "automount scrub" command

This option removes the volume mount point directories and registry settings for volumes that are no longer connected to the system. Basically, this unassigns all driver letters from all previously connected drives that are not currently connected or turned on.

delete drive letter assignment

Remove Drive Letters of Previously Connected Drives using "mountvol" command

delete drive letter assignment

  • Enable or Disable Automatic Mounting of New Drives in Windows 11
  • Change Drive Letter in Windows 11
  • Hide or Show Drive Letters in File Explorer in Windows 11
  • Show Drive Letters Before or After Drive Name in Windows 11

Well-known member

  • Sep 25, 2023

For option #6: Code: This option removes the volume mount point directories and registry settings for volumes that are no longer connected to the system. Basically, this unassigns all driver letters from all previously connected drives that are not currently connected or turned on. When would regedit be used instead of mountvol? Computer\HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices > \DosDevices\Z: > delete What happens if a registry drive letter deletion is used instead of modifying mount point directories? How come "for volumes that are no longer connected to the system" ? Can't the mountvol command be used for volumes that are connected to the system? For example to remove a temporarily assigned drive letter?  

My Computer

  • OS Windows 10 Computer type Laptop Manufacturer/Model HP CPU Intel(R) Core(TM) i7-4800MQ CPU @ 2.70GHz Motherboard Product : 190A Version : KBC Version 94.56 Memory 16 GB Total: Manufacturer : Samsung MemoryType : DDR3 FormFactor : SODIMM Capacity : 8GB Speed : 1600 Graphics Card(s) NVIDIA Quadro K3100M; Intel(R) HD Graphics 4600 Sound Card IDT High Definition Audio CODEC; PNP Device ID HDAUDIO\FUNC_01&VEN_111D&DEV_76E0 Hard Drives Model Hitachi HTS727575A9E364 Antivirus Microsoft Defender Other Info Mobile Workstation

Brink

Administrator

zbook said: For option #6: Code: This option removes the volume mount point directories and registry settings for volumes that are no longer connected to the system. Basically, this unassigns all driver letters from all previously connected drives that are not currently connected or turned on. When would regedit be used instead of mountvol? Computer\HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices > \DosDevices\Z: > delete What happens if a registry drive letter deletion is used instead of modifying mount point directories? How come "for volumes that are no longer connected to the system" ? Can't the mountvol command be used for volumes that are connected to the system? For example to remove a temporarily assigned drive letter? Click to expand...

delete drive letter assignment

My Computers

System one system two.

  • OS Windows 11 Pro for Workstations Computer type PC/Desktop Manufacturer/Model Custom self build CPU Intel i7-8700K 5 GHz Motherboard ASUS ROG Maximus XI Formula Z390 Memory 64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR) Graphics Card(s) ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X) Sound Card Integrated Digital Audio (S/PDIF) Monitor(s) Displays 2 x Samsung Odyssey G75 27" Screen Resolution 2560x1440 Hard Drives 1TB Samsung 990 PRO M.2, 4TB Samsung 990 PRO M.2, 8TB WD MyCloudEX2Ultra NAS PSU Seasonic Prime Titanium 850W Case Thermaltake Core P3 wall mounted Cooling Corsair Hydro H115i Keyboard Logitech wireless K800 Mouse Logitech MX Master 3 Internet Speed 1 Gbps Download and 35 Mbps Upload Browser Google Chrome Antivirus Microsoft Defender and Malwarebytes Premium Other Info Logitech Z625 speaker system, Logitech BRIO 4K Pro webcam, HP Color LaserJet Pro MFP M477fdn, APC SMART-UPS RT 1000 XL - SURT1000XLI, Galaxy S23 Plus phone
  • Operating System Windows 11 Pro Computer type Laptop Manufacturer/Model Surface Laptop Copilot+ PC CPU Snapdragon X Elite (12 core) 3.42 GHz Memory 16 GB LPDDR5x-7467 MHz Monitor(s) Displays 15" HDR Screen Resolution 2496 x 1664 Hard Drives 1 TB SSD Internet Speed Wi-Fi 7 and Bluetooth 5.4 Browser Chrome and Edge Antivirus Windows Defender

www.elevenforum.com

Why is there a Z: drive listed after partitioning my SSD?

www.elevenforum.com

zbook said: In this thread: Why is there a Z: drive listed after partitioning my SSD? My file explorer shows a Z: drive after I partitioned my 1TB SSD into C: for Windows, and D: for data. A snapshot of Disc Management shows Since I would like to image my windows setup, I wonder if the Z: drive should form part of this. I dont really know what it is, or how to deal with... www.elevenforum.com there were different methods suggested when diskpart and disk management did not remove a drive letter. Click to expand...

When mountvol /d is used it will remove both volume mount point directories and registry settings. What hppens to volume mount point directories when regedit is used? Any pro/con?  

zbook said: When mountvol /d is used it will remove both volume mount point directories and registry settings. What hppens to volume mount point directories when regedit is used? Any pro/con? Click to expand...

Thx.  

zbook said: Thx. Click to expand...

:shawn:

Similar Windows 11 Tutorials

delete drive letter assignment

  • May 12, 2024

Brink

  • May 22, 2024

delete drive letter assignment

  • May 13, 2024

delete drive letter assignment

  • Mar 6, 2024

delete drive letter assignment

  • Jun 4, 2024

Bree

  • Jan 29, 2024

delete drive letter assignment

  • Apr 3, 2024

Uninstall or Reinstall Copilot app in Windows 11 and Windows 10

Uninstall or Reinstall Copilot app in Windows 11 and Windows 10

  • Jun 20, 2024

Enable or Disable Recall Snapshots in Windows 11

Enable or Disable Recall Snapshots in Windows 11

  • May 24, 2024

Enable or Disable Sudo Command in Windows 11

Enable or Disable Sudo Command in Windows 11

  • Feb 8, 2024

Enable or Disable Feeds on Widgets Board in Windows 11

Enable or Disable Feeds on Widgets Board in Windows 11

  • Dec 4, 2023

Use ViVeTool to Enable or Disable Hidden Features in Windows 11

Use ViVeTool to Enable or Disable Hidden Features in Windows 11

  • Dec 1, 2023

Disable Ads in Windows 11

Disable Ads in Windows 11

  • Jul 28, 2022

Disable Modern Standby in Windows 10 and Windows 11

Disable Modern Standby in Windows 10 and Windows 11

  • Jan 11, 2022

Disable "Show more options" context menu in Windows 11

Disable "Show more options" context menu in Windows 11

  • Oct 4, 2021

Download Official Windows 11 ISO file from Microsoft

Download Official Windows 11 ISO file from Microsoft

  • Aug 19, 2021

Restore Classic File Explorer with Ribbon in Windows 11

Restore Classic File Explorer with Ribbon in Windows 11

  • Jul 19, 2021

Repair Install Windows 11 with an In-place Upgrade

Repair Install Windows 11 with an In-place Upgrade

  • Jul 5, 2021

Clean Install Windows 11

Clean Install Windows 11

  • Jun 22, 2021

Latest Support Threads

antspants

  • Started by antspants
  • 38 minutes ago

Mickmac

  • Started by Mickmac
  • Today at 7:17 PM
  • Started by Dragonfire2133
  • Today at 4:13 PM

Hollowcow

  • Started by Hollowcow
  • Today at 4:10 PM
  • Started by Ben418
  • Today at 3:07 PM

Latest Tutorials

delete drive letter assignment

  • Started by Brink
  • Today at 2:46 PM

delete drive letter assignment

  • Today at 11:47 AM

delete drive letter assignment

  • Yesterday at 1:26 PM

delete drive letter assignment

  • Yesterday at 11:31 AM

delete drive letter assignment

  • Saturday at 8:59 AM

At the edge of tweaking

Advertisement

Remove Drive Letter in Windows 11

The easiest way to remove a drive letter is the Settings app.

Remove Drive Letter in the Settings app

  • Press Win + I to open the Settings app.

System - Storage

This will instantly remove the letter for the chosen drive, and you can safely close the Settings app if you have no other tasks for it.

Disk Management is another easy way to delete a letter for any drive.

Remove Drive Letter in Disk Management

Select Disk Management from the menu

  • Confirm the letter removal by clicking on Yes , and the drive will instantly disappear from File Explorer.

An alternative method is the console DiskPart tool. It allows you to remove the drive letter from the command prompt. This will hide the drive in File Explorer.

Using DiskPart

Run diskpart

  • Write down or remember of the volume number, e.g. 5 for the drive letter you want to remove.

diskpart sel volume

  • Now close the DiskPart window, or type exit to leave it via a command.

That's how you remove the drive letter with diskpart.

diskpart assign letter

Now, let's review an additional method that involves PowerShell. Note that you'll need a PowerShell console open as Administrator (elevated) .

Remove Drive Letter with PowerShell

Remove Drive Letter 16

  • The drive letter is now removed, and the drive is no longer exposed in File Explorer.

You have successfully deleted the letter with PowerShell. But there are more console methods. The built-in mountvol command is one of them, so let's review it.

Remove Drive Letter using "mountvol" command

  • Press Win + X , select Terminal (Admin) from the menu that open, and select either Windows PowerShell or Command Prompt as you Terminal tab.

mountvol

  • You can now close the Terminal app.

â–¶ The mountvol utiliity allows creating, deleting, or listing a volume mount point. Additionally, volumes can be linked without the need for a drive letter, i.e. to a folder. For reference, check out this documentation .

Remove drive letters for earlier connected devices

Here we will delete the associated letters and registry entries for volume mount points of drives no longer connected to the system. In simpler terms, it removes any assigned driver letters from drives that are not currently connected or powered on. You have two options for that.

Option 1. The automount scrub command

  • From the Start button's right-click menu, select Terminal (Admin) , and select either Windows PowerShell or Command Prompt .

remove letters for disconnected drives

  • The letters for disconnected devices are now released. It is now safe to close  Terminal.

Option 2. The mountvol  /r command

  • Open Terminal (Admin) from the Win + X menu, and select either Windows PowerShell or Command Prompt profile (tab).

delete drive letters for earlier connected devices

  • You can now close the Terminal window if you have no other tasks for it.

Voila, you have successfully deleted the earlier assigned letters for all disconnected devices.

Finally, once you delete the letters for all desired partitions, you may want to prevent Windows from assigning the letters for specific drives. It is also possible. Follow the steps in the next chapter.

Prevent Windows from Assigning Drive Letter to Partition

We already know that Windows automatically designates the letter C for the system partition and the letter D for the user partition, and so on. You have the option to modify the letter of a custom partition or delete it entirely using the Disk Management snap-in. But any other user can easily assign a letter to the partition using the same Disk Management tool.

If you want, you can prevent Windows from assigning a letter for a specific partition. For that, you need to change partition attributes by following the steps below.

To prevent Windows from assigning  a drive letter for a partition, do the following .

  • Right-click the Start button, and select Run from the menu (or press Win + R ).
  • In the Run dialog, type diskpart , hit Enter , and confirm the User Account Control prompt (if appears).

disk part list disk

  • Next, type list volum , and hit Enter . Note the volume number that corresponds to the partition you want prevent from having a letter.

list volumes in diskpart

  • If it has a letter, you can now remove it with the remove letter F command, where F is the drive letter (use the actual one instead of F).
  • Finally, the next two commands will do the trick. Type set id=de94bba4-06d1-4d40-a16a-bfd50179d6ac and press Enter . This command assigns the status of a service recovery partition to the volume.
  • The final command is gpt attributes=0x8000000000000001 . It sets two flags, "required partition" and "never assign the letter". This is the only way to prevent Windows to add the letter.

That's it! From now on, your specified drive will never have a letter.

Prevent letter assignment on MBR

You may have already noticed the "gpt" command. It applies to the modern gpt partition layouts. If your device comes with Windows 10 or Windows 11 preinstalled, it is hard to imagine that it doesn't have the GPT layout. But if by a chance you have installed Windows on an older drive with the legacy MBR partition layout, you need to use a different command instead of the last two.

đź’ˇ Here is how you can find if you have GPT or MBR partition layout .

So, for an MBR drive, use the command set id=27 override . The set of commands in this case will be as follows

select disk <disk number> list part sel part <partition number> set id=de94bba4-06d1-4d40-a16a-bfd50179d6ac gpt attributes=0x8000000000000001 set id=27 override

Undoing the changes

To make the partition "regular" again, you need to substitute value in the last command(s).

For GPT partitions, it will be

set id=ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 gpt attributes=0X0000000000000000

And for MBR, the last command is

set id=07 override

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram , Twitter , and YouTube . View all posts by Sergey Tkachenko

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

transparent

Privacy Overview

css.php

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
  • Partition Manager

How to Remove the Drive Letter in Windows 10

Is it possible to remove or hide the drive letter in Windows? How to remove the drive letter? If you have the same question, you can follow this post of MiniTool Partition Wizard to rename the partition in Windows. There are several methods listed to remove the drive letter and hide the partition.

A drive letter refers to a single alphabetic character A to Z, which is assigned to a partition on your disk. When the computer detects a new internal or external hard drive, your Windows operating system automatically assigns an available drive letter to it. Then you can make changes to the devices directly and do not have to assign the drive letters manually.

However, there are several drive letters assigned by default. For instance, the first active hard disk partition containing the operating system is assigned the drive letter C. Besides, drive letters A and B are reserved by Windows for floppy drives, which are not commonly used for other partitions.

Although it is convenient that Windows assigns the drive letter automatically, users may want to remove or change the drive letter for some reason. For instance, some letters are preferred and some are not, so you may not want Windows to assign the drive letters automatically. Besides, a partition can get hidden by removing its drive letter. If you remove the drive letter of a hard drive, it won’t be able to show up in File Explorer.

How to hide the drive letter? There are five methods listed below to give you a reference. You can have a try on them according to your situation.

Two Effective Ways Help You Hide Partition Windows 7 for Free

To hide disk partition in Windows 7 helps prevent private information from leakage, and this post will show you how to hide partition in detailed steps.

How to Remove the Drive Letter

Method 1. use file explorer.

If you only want to remove the drive letter of the partitions on your disk, you can use File Explorer to hide the drive letter. In this way, data stored in the partition can still be viewed and changed. Follow the detailed steps below.

Step 1 . Press the Win + E keys to open File Explorer , then click the View tab from the ribbon toolbar and click Options .

select Options

Step 2 . When the Folder Options window pops up, click the View tab. Then find and uncheck Show drive letters box under the Advanced settings section. Click Apply and OK sequentially to save changes.

uncheck Show drive letters box

Step 3 . Then you can see that the drive letters of all the hard drives on the disk are removed. Besides, you can still open the partition and view the files and folders on it. If you want to restore the drive letters, you can repeat the above steps and then check the Show drive letters option.

If you want to hide the partition by removing the drive letter and protect the data stored in it, you can refer to the following methods.

Method 2. Use Disk Management

You can use the Windows built-in tool – Disk Management to remove the drive letter. After removing the drive letter, you cannot view and open the partition on the computer. Follow the detailed steps below.

Step 1 . Right-click the Windows Start menu and select Disk Management . When Disk Management opens, right-click the partition of which you want to remove or change its drive letter and select Change Drive Letter and Paths .

If the partition is not in use, removing the drive letter can go smoothly. However, if the partition is used by programs, drive letter removal may cause unexpected issues. Thus, it’s recommended not to remove or change the drive letter of the partition that has Windows and apps running right now.

select Change Drive Letter and Paths option

Step 2 . Select the drive letter of the selected partition and then click the Remove button. Then a warning window will pop up, click Yes .

remove the drive letter

Step 3 . Now you can see the drive letter is removed in Disk Management, and you can’t find the corresponding partition in File Explorer. Besides, you cannot open and explore the data stored in this partition even in Disk Management.

Free Windows 10 Disk Management Helps Manage Disks and Partitions

How to get to Disk Management Windows 10 for disk or partition management? This post shows you much on disk management Windows 10.

Method 3. Use Command Prompt

You can try to hide the drive letter by using Command Prompt , which is a command line interface for Windows operating system. Follow the detailed steps below.

Step 1 . Press the Windows + R keys to open the Run box. Then type cmd in the box and press the Ctrl + Shift + Enter keys to run Command Prompt as administrator.

Step 2 . Then in the pop-up window, type mountvol <Drive Letter>: /d and press the Enter key to execute the command.

remove the drive letter

Also, you can type diskpart in Command Prompt to open it. Then type the following commands in diskpart and press Enter after each command to execute.

list volume (this command can list the partition information of your disk; you need to confirm the drive letter of the volume which you want to remove its drive letter)

select volume * (* represents the volume number that you want to select. For example, I type select volume 4 to make changes to it)

remove letter= * (* represents the letter of the selected volume)

type commands to remove the drive letter

Step 3 . After exiting the Command Prompt, you can go to File Explorer to view the change. You will find that the partition is not shown in File Explorer and you can’t open and explore the data stored in this partition.

If you want to restore the drive letter, you can repeat above steps and type assign letter=* instead or give letter in Disk Management.

Method 4. Use PowerShell

Besides, you can refer to the following steps to remove the drive letter via PowerShell .

Step 1 . Right-click the Windows icon and select Windows PowerShell (Admin) to run PowerShell as administrator.

Step 2 . In the pop-up window, type the following commands to remove the drive letter. Remember to press the Enter key after each command to execute.

Get-Disk (you can see the list of your drives)

Get-Partition (you can see the list of your partitions)

Get-Disk <disk number> | Get-Partition (substitute <disk number> with the actual disk number that you want to select. Ensure the selected disk contains the partition that you want to remove its drive letter)

Remove-PartitionAccessPath -DiskNumber <disk number> -PartitionNumber <partition number> -Accesspath <drive letter> (you can check the disk number, partition number and drive letter in above commands.)

You must type the correct command into the window. For example, I type  Remove-PartitionAccessPath -DiskNumber 0 -PartitionNumber 3 -Accesspath E:  to remove the drive letter E from the partition on disk 0.

type the commands to remove the drive letter

Step 3 . Exit the PowerShell and you can view the change in File Explorer and Disk Management.

Method 5. Use MiniTool Partition Wizard

In addition to above methods, I highly recommend using a professional partition manager – MiniTool Partition Wizard to hide the drive letter. As a multifunctional tool, MiniTool Partition Wizard can help you manage your disks and partitions safely and conveniently.

MiniTool Partition Wizard has a number of useful functions. For instance, it can help you rename the partition  flexibly. Besides, if you want to recover lost or deleted data in the partition, you can use the Data Recovery function of MiniTool Partition Wizard.

What’s more, its Change Letter function can help you remove the drive letter or change the drive letter for free. After removing the drive letter in MiniTool Partition Wizard, you can still explore the files and folders in the partition and make more changes to the partition.

Now I will show you the specific steps to hide the drive letter by using MiniTool Partition Wizard.

Step 1 . Download MiniTool Partition Wizard, install and launch it to get its main interface.

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

Step 2 . Choose the partition of which you want to remove its letter, then right-click it and select the Change Letter function.

select the Change Letter option

Step 3 . In the pop-up window, select None as New Drive Letter . Then click OK .

select None as New Drive Letter

Step 4 . Click the Apply button to apply the changes. After removing the drive letter, you can right-click the partition of which the letter is removed and select Explore to view the data stored in it.

5 Ways to Protect Our Important and Valuable Data in Windows

You can take 5 ways to protect valuable, personal or confidential data in Windows platform, and detailed steps for each method are shown in this post.

How to Hide a Partition

If your aim of removing the drive letter is to hide the partition and prevent the date stored on it from viewing and modifying, it’s more recommended to use the Hide Partition function of MiniTool Partition Wizard.

After hiding the partition, the partition cannot be viewed and modified except for deletion. Thus, it’s safer and more convenient than removing the drive letter to hide the partition. You can refer to the following steps to hide the partition.

Step 1 . Download MiniTool Partition Wizard Free Edition, install and launch it to get its main interface.

Step 2 . Right-click the partition that you want to hide and select the Hide Partition function.

select Hide Partition function

Step 3 . Then click the Apply button. Click Yes in the pop-up window and wait for a while until the process ends up. If you want to hide more partitions, you can repeat above steps.

After hiding the partition, you can check it in Disk Management. The only operation you can do is to Delete Volume . If you want to unhide the partition , you can right-click the hidden partition and select the Unhide Partition function.

5 Ways to Get the Missing Drive Letters Back in Windows

Drive letters is mssing? This post introduces several simple ways to help you get disappeared drive letters back soon.

Wrapping Things Up

In this post, you have learned the ways to remove the drive letter and hide the partition on computer. For instance, you can use File Explorer, Disk Management, Command Prompt and PowerShell to help remove the drove letter. Remember doing these just hide the drive letter but doesn’t hide the partition.

MiniTool Partition Wizard is a better choice to remove the drive letter and hide the partition. In addition, there are a number of functions provided in MiniTool Partition Wizard to help you manage your disk and partitions.

If you have any issues using MiniTool Partition Wizard, just feel free to contact us via [email protected] or leave us a message.

About The Author

Position: Columnist

User Comments :

  • Mobile Computing

delete drive letter assignment

  • Good to know
  • VPN for streaming
  • VPNs for gaming
  • Privacy news
  • VPN reviews
  • Windows 11 News
  • Windows 11 Help
  • Windows tips
  • Windows Update
  • Data Recovery
  • File Sharing
  • Microsoft Office
  • Firefox add-ons
  • Chrome Extensions
  • Internet Explorer
  • Microsoft Edge
  • Google Maps
  • Google Android
  • Thunderbird
  • Crypto & Blockchain
  • Development
  • Music and Video

How to remove drive letters in Windows

windows disk management

Windows assigns drive letters to internal and external hard drives, optical drives, Flash memory cards and other devices automatically when it recognizes them.

The main reason for that is that it allows users of the system to interact with the devices directly; it would certainly be inconvenient if users had to assign drive letters to new devices manually, or even each time devices get connected.

Sometimes, however, you may not want drive letters assigned to devices automatically or at all. A common scenario is a partition of a different operating system that you don't want to access; another, that encrypted drives or partitions don't require a drive letter until they are mounted as you can't interact with the unmounted drives.

Remove drive letters using Disk Management

All versions and editions of Windows include the Disk Management tool. Disk Management is the primary tool of the Windows operating system for managing drives and other storage devices. It provides options to add, change or remove drive letters, shrink or extend volumes, or attach virtual hard drives.

Windows supports quite a few ways to launch the Disk Management tool; the most convenient options in my opinion are the following two:

  • Use Windows-R to open the runbox, type diskmgmt.msc and hit the Enter-key on the keyboard.
  • Use the Windows-X menu and select Disk Management. (Windows 8 and newer only)

The Disk Management interface may take a moment to load. It lists all available volumes and disks in its interface on start, and you may interact with the volume listing or the visual representation of each disk.

I find it easier to work with the disk list in the lower half of the Disk Management interface, but any action available there is also available in the volume listing.

Disk Management lists disks, partitions, and drive letters. It is easy to spot partitions with drive letters and those without.

To interact with a partition right-click on it in the Disk Management interface.

disk management

A right-click displays the context menu. You may use it to execute all supported operations; select "change drive letter and paths..." in this case to remove the drive letter from the partition.

Disk Management lists assigned drive letters of the volume in a new window when you select the option. The interface lists options to add, change or remove the drive letter.

To remove it, select it and then the remove button to execute the action.

remove drive letter

Disk Management displays a warning prompt when you select remove:

Some programs that rely on drive letters might not run correctly. Are you sure you want to remove this drive letter?

Removal is not an issue if the volume is not used but it may cause issues if it is used by programs, for instance for data storage. Select yes to continue with the execution or no to cancel it.

Disk Management closes the prompt automatically and visualizes the change in its interface. If you selected remove, the drive letter should no longer be attached to the volume. The change is reflected in Explorer and other file browsers as well.

You may add drive letters to volumes using the same step by step guide. The only difference is that you need to select add and pick one of the available drive letters.

Removing drive letters using the command prompt

mountvol command prompt

You need elevated rights to remove a drive letter using the command prompt:

  • Tap on the Windows-key to display the Start Menu.
  • Type cmd.exe, hold down the Shift-key and Ctrl-key, and select the item from the list of results.
  • Confirm the UAC prompt.

You can use the command mountvol to interact with volumes. A good starting point is the command mountvol /? which lists all supported parameters and all volumes similar to the listing that you get when you run the Disk Management interface.

Use the /D parameter to remove a drive letter from the selected volume. The command mountvol d: /D removes the drive letter from volume D:

Use the command mountvol d: VolumeName To reassign a drive letter. VolumeName begins with \\ and all available volumes are listed when you run mountvol /?.

Related articles

  • Get a quick overview of all USB devices
  • How To Hide Hard Drives And Partitions In Windows
  • Move Program Folders in Windows without affecting functionality
  • Paragon Hard Disk Manager 16 Basic review

How to remove drive letters in Windows

Related content

Microsoft's Weather app now displays more ads

Microsoft's Weather app now displays more ads

Windows

Windows 11 Government Edition is what everyone wants, but there is a catch

A new journey with Windows

Windows 10 Support until 2030? 0Patch makes it possible

Windows 11 set up is automatically enabling OneDrive folder back up for users

Windows 11 set up is automatically enabling OneDrive folder back up for users

Microsoft is testing new features in Windows Recall - Screenray and Topics

Microsoft is testing new features in Windows Recall: Screenray and Topics

The end of windows 11's recall ai feature microsoft postpones launch, tutorials & tips.

delete drive letter assignment

How to Capture Screenshots on Windows 10 and 11

delete drive letter assignment

Quick Ways to Open Device Manager in Windows 11

delete drive letter assignment

Here is How to Permanently Disable Windows Defender

delete drive letter assignment

4 Tested Ways to Install Windows 11 on Unsupported CPU

Can I just say that I remember that the old Amiga did this far more elegantly…?

Come to that, the Amiga did almost everything way better than Windoze ever has.

Pity Commodore were so crap at marketing…

In my view, Microfiche Filer Plus had more flexibility on an Amiga with 1 meg of memory than Microsoft Access does today. I suppose part might be my lack of knowledge on Access, but I wish there were a version of Microfiche Filer Plus that would do all it would do, and utilize the extra memory and stuff from today. Dr. T’s KCS sequencer also seemed to have more control over midi on the same machine than keyboard sequencers I find today.

Being able to do this via a command prompt is very useful. For my PC, my primary backups are on additional hard drives inside the system (I also have a NAS for secondary backups). To help protect against malware/ransomware, the drives are not mounted by default. Instead, the backup script mounts the drive, runs the backup, then unmounts it afterwards. Nice and seamless.

To simlify the whole process you can use Drive Letter Changer v1.3 Portable freeware https://www.sordum.org/8501/drive-letter-changer-v1-3/

Very handy, especially if WD Passport refuses to eject in Win 7, changing drive letter helps sometimes…

On Linux, C: drive letter equivalent would be SDA1, D: drive letter equivalent would be SDA2 and so on if you have only one hard drive installed and partitioned. Second hard drive partitions would go by SDB1, SDB2 and so on. Hard drives itself would be called SDA, SDB, SDC, etc. just sharing info in case you didn’t know.

That’s usually how it goes, but isn’t so universal that it can be stated without qualification. The exact mapping can vary according to the machine’s hardware configuration (and, to a lesser degree these days, which distro you’re using).

For instance, on my laptop, the equivalent to C: is /dev/sdb1

But, perhaps more importantly, Linux handles hard drives in a completely different way than Windows, and the concept of “drive letters” doesn’t exist and isn’t needed by Linux. Unless a user is doing something pretty advanced, they can just treat all the drives collectively the way that Linux presents them: as a single unified “drive”.

Handy article, Martin. Thanks!

you can also just type diskmgmt.msc or (even easier just diskmgmt )into search box w/o using win-r keys.

Leave a Reply Cancel reply

Save my name, email, and website in this browser for the next time I comment.

Advertisement

Spread the word, hot discussions.

delete drive letter assignment

Recently Updated

delete drive letter assignment

Latest from Softonic

About ghacks.

Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.

  • Legal Information
  • Terms of use
  • Privacy Policy
  • Cookie Policy
  • Cookie settings
  • Advertise with Us
  • Martin Brinkmann
  • Mike Turcotte

delete drive letter assignment

  • DiskPart Command Line Utility >

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

This post will show you how to use Diskpart assign drive letter in Windows 11, 10, 8, 7. In addition, another free GUI software will be introduced to assign or remove the drive letters.

Cherry

By Cherry / Updated on November 9, 2023

twitter

│ Use Diskpart to assign drive letter

│ assign drive letter via disk management, faqs about how to use diskpart to assign drive letter, why use diskpart to assign a drive letter.

As we all know, Windows assigns drive letters to all available drives on your computer, such as internal hard drives, optical drives, SD cards, and external USB drives. A drive letter is an alphabetical identifier for a volume, and each drive letter can be used once on a computer.

But sometimes, users want to change the original drive letter to another drive letter. Or due to some operation, the drive letter will not be available and the user needs to assign a new drive letter. So a computer-experienced user might assign drive letter by Diskpart, as this is the faster way. The purpose of this article is to provide you with some methods for assigning a drive letter , including Diskpart, Disk Management, and another easier way.

Step-by-step: Assign drive letter by Windows built-in tools

Windows OS users know they have two amazing tools for managing disks and partitions - Disk Management and Diskpart.

The Disk Management tool in Windows provides you with an easy-to-use graphical interface to manage your disks with a single mouse click. And Diskpart is a command-line tool that allows you to quickly manage your disks or partitions from the command prompt. The next section will show you how to use Disk Management and Diskpart to assign drive letters.

Diskpart is a Windows built-in tool that you can use to manage your hard drive, like format disk partition, create partition, delete partition , etc. 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. Finally, type in“assign letter=F” and press Enter.

If you want to remove the drive letter, type “remove letter=X”(X is the drive letter you want to remove).

Actually, you may assign a drive letter when you create a new one. For that, you need to create partition first. After creating a partition, type “assign letter=?” to that partition. Or, if there is some volume hidden, it will not have the drive letter, to unhide it, you need to assign a drive letter for it. 

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.

Notice: If you want to remove the drive letter of your partition, you can select "Remove" and follow the instructions step by step.

Step 4. After that, you should choose the new drive letter from the drop list, and then, click OK.

Now, do you understand how to use Disk Management and Diskpart assign drive letter?

Although it's convenient for most people, you need to be aware that sometimes you can't assign drive letter successfully, because Disk Management and Diskpart only support assigning drive letter with FAT or NTFS. When the drive's file system is another type, you can format it to NTFS or FAT, or use another method to assign a drive letter.

Diskpart assign drive letter alternative

Disk Management and Diskpart are not perfect because they have limitations. Fortunately, there is an easier way to make up for their shortcomings perfectly.

AOMEI Partition Assistant Standard is a completely free third-party partition manager. It supports users to assign drive letters through a more friendly interface, which can be done with just a few clicks, much simpler than Diskpart. Also, it can assign drive letter on any file system. More importantly, it has more complete functions and allows you to manage disks flexibly.

Step 1. Launch AOMEI Partition Assistant, it will show you all storage devices in the main interface. you can see the removable drive doesn't have a drive letter. If you want to assign a drive letter for the drive, here you need to right click it, select Advanced-> Change Drive Letter.

Step 2. Then, select a drive letter for the drive.

Step 3. Click Apply to submit the task.

Now, do you know how to use Diskpart assign drive letter? If you are a user who has a computer background, Diskpart may be the quickest method to assign the drive letter. However, if you are normal user, AOMEI Partition Assistant Standard is the correct choice.  After you upgrade to AOMEI Partition Assistant Professional , there are more advanced features you can try, such as allocating free space from one drive to C, and Move the installed app from one drive to another.

Last but not least, although the system drive letter can be changed, do not do it because that would make the system unable to boot.

Can I remove a drive letter assignment using Diskpart? Yes, you can remove a drive letter assignment by using the "remove" command. For example, "remove letter=E" will remove the E drive letter from the selected volume.

Are there any restrictions on the drive letters I can assign using Diskpart? Drive letters A and B are traditionally reserved for floppy disk drives. You can assign any available drive letter from C to Z to a partition or volume, provided it's not already in use.

Do I need to be careful when using Diskpart to avoid data loss? Yes, you should be cautious when using Diskpart, especially if you're deleting partitions or making significant changes to disk configurations. Make sure you select the correct volume and drive letter to avoid accidental data loss.

Can I assign drive letter on a hidden drive? Yes, you can. Be very cautious when assigning a drive letter to a hidden drive or volume, as it might contain system or recovery files.

Press the Windows key, type "cmd" or "Command Prompt," right-click it, and choose "Run as administrator". In the Command Prompt window, type "diskpart" and press Enter. This will open the Diskpart utility. To see a list of all volumes, including hidden ones, type list volume and press Enter. Use the "select volume" command to choose the hidden volume. Replace "X" with the volume number or letter. A ssign a drive letter to the selected hidden volume, use the "assign letter=Y" command. Once you've successfully assigned the drive letter, you can exit Diskpart.

Cherry

Related Articles

How to permanently assign drive letter with ease.

A permanent drive letter prevents us from being confused with multiple USB drives. Then, how to permanently assign drive letter with ease? This post offers three effective ways to make it.

Drive Letter Not Available-Why and How to Solve It?

Can’t assign drive letter in Disk Management because a certain drive letter is not available? Follow this article to solve it efficiently.

How to Change Partition Type ID Easily? (2 Ways Included)

Are you in need of changing partition type ID in Windows? Read this article thoroughly to get two efficient methods to modify partition type ID.

Free Download to Try AOMEI Partition Assistant Now






















 

Description

System requirements, versions history, using driveletterview, command-line options.

/change <local | network> <Current Drive Letter> <New Drive Letter> Allows you to change a drive letter from command line, for example:
DriveLetterView.exe /change local k: l:
DriveLetterView.exe /change network g: p:
/delete <local | network> <Drive Letter> Allows you to delete a drive letter from command line, for example:
DriveLetterView.exe /delete local k:
DriveLetterView.exe /delete network g:
/stext <Filename> Save the drive letters list into a regular text file.
/stab <Filename> Save the drive letters list into a tab-delimited text file.
/scomma <Filename> Save the drive letters list into a comma-delimited text file (csv).
/stabular <Filename> Save the drive letters list into a tabular text file.
/shtml <Filename> Save the drive letters list into HTML file (Horizontal).
/sverhtml <Filename> Save the drive letters list into HTML file (Vertical).
/sxml <Filename> Save the drive letters list into XML file.
/sort <column> This command-line option can be used with other save options for sorting by the desired column. If you don't specify this option, the list is sorted according to the last sort that you made from the user interface. The <column> parameter can specify the column index (0 for the first column, 1 for the second column, and so on) or the name of the column, like "Drive Type" and "Drive Letter". You can specify the '~' prefix character (e.g: "~Drive Name") if you want to sort in descending order. You can put multiple /sort in the command-line if you want to sort by multiple columns.

Examples:
DriveLetterView.exe /shtml "f:\temp\drives.html" /sort 2 /sort ~1
DriveLetterView.exe /shtml "f:\temp\drives.html" /sort "Drive Type" /sort "Drive Letter"

/nosort When you specify this command-line option, the list will be saved without any sorting.

Translating DriveLetterView to other languages

LanguageTranslated ByDateVersion
22/12/20201.50
07/04/20141.30
17/02/20111.00
Shar (viteco(at-sign)centrum.cz)27/11/20191.50
Jan Verheijen26/10/20191.50
Geert Delmeiren19/12/20131.25
Skorpix3830/03/20141.30 (30mar2013)
27/10/20191.50
24/09/20141.40
Timinoun12/12/20221.50
05/04/20141.0
19/03/20221.50
Hightower27/10/20191.50
03/01/20191.46
Dmitry Yerokhin27/10/20191.50
27/09/20201.50
František Fico29/10/20191.50
16/03/20111.05
26/10/20161.45
Abel Chuang12/03/20131.25
HARUN ARI15/06/20111.11

Naveen Kapil – Blog

Blog by Naveen Kapil – System And Network Administrator

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.

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.

Share this:

Leave a reply cancel reply.

Your email address will not be published. Required fields are marked *

Notify me of follow-up comments by email.

Notify me of new posts by email.

This site uses Akismet to reduce spam. Learn how your comment data is processed .

delete drive letter assignment

The “Hey, Scripting Guys!” blog has been retired. There are many useful posts in this blog, so we keep the blog here for historical reference. However, some information might be very outdated and many of the links might not work anymore.

New PowerShell content is being posted to the PowerShell Community blog where members of the community can create posts by submitting content in the GitHub repository .

PowerTip: Use PowerShell to Remove Drive Letter

Doctor Scripto

December 7th, 2015 0 0

Summary : Learn how to use Windows PowerShell to remove an assigned drive letter from a partition.

Hey, Scripting Guy! Question

$DriveLetter=’X Get-Volume -Drive $DriveLetter | Get-Partition | Remove-PartitionAccessPath -accesspath "$DriveLetter`:\"

Doctor Scripto Scripter, PowerShell, vbScript, BAT, CMD

Discussion is closed.

light-theme-icon

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Remove all saved USB drive letter assignments

Is there a location in Windows that can be used to reset all of the USB assignments, and start from scratch in Server 2008 R2?

Edit: This question involves systems that I do not own, as was to resolve an issue with backup drives.

  • windows-server-2008

MJ.'s user avatar

2 Answers 2

get yourself a copy of usbdview shows all assigned usb devices, including drive letters. delete away

I have used this article with great success. The problem was that sometimes Device Manager seemed to get confused and I would have to assign drive letters manually to make USB keys work. After cleaning out "Disk Drives" and "USB Controllers" the auto detection and letter assignment would work properly again. By "clean out" I mean deleting each of the grayed out entries. This can be quite a tedious process...

http://support.microsoft.com/kb/315539

cwheeler33's user avatar

You must log in to answer this question.

Not the answer you're looking for browse other questions tagged windows usb windows-server-2008 ..

  • The Overflow Blog
  • How to build open source apps in a highly regulated industry
  • Community Products Roadmap Update, July 2024
  • Featured on Meta
  • We spent a sprint addressing your requests — here’s how it went
  • Upcoming initiatives on Stack Overflow and across the Stack Exchange network...

Hot Network Questions

  • How well does the following argument work as a counter towards unfalsifiable supernatural claims?
  • Is truth-in-a-model understood as consistency-of-discharged-antecedents?
  • Is it prohibited to consume things that unclean animals produce?
  • Cathay Pacific Online Booking: When to Enter Passport Details?
  • Hölder continuity in time of heat semigroup
  • What does a letter "R" means in a helipad?
  • Will electrolysis hydrolyze esters?
  • How do guitarists remember what note each string represents when fretting?
  • How to NDSolve a PDE that contains the integral of the solution?
  • Staying in USA longer than 3 months
  • Are there examples of triple entendres in English?
  • Why would a plane be allowed to fly to LAX but not Maui?
  • Is there any legal justification for content on the web without an explicit licence being freeware?
  • Travel to Mexico from India, do I need to pay a fee?
  • Correlation for Small Dataset?
  • Turning Misty step into a reaction to dodge spells/attacks
  • Tikz Border Problem
  • Boundary Conditions on the Inlet and Outlet in a Discontinuous Galerkin framework
  • How far back in time have historians estimated the rate of economic growth and the economic power of various empires?
  • In equation (3) from lecture 7 in Leonard Susskind’s ‘Classical Mechanics’, should the derivatives be partial?
  • Why can't LaTeX (seem to?) Support Arbitrary Text Sizes?
  • Any algorithm to do Huffman encoding without using graphs?
  • Can you arrange 25 whole numbers (not necessarily all different) so that the sum of any three successive terms is even but the sum of all 25 is odd?
  • 224.0.0.0/4 In IPv4 Routing Table

delete drive letter assignment

IMAGES

  1. Remove Drive Letter in Windows 10

    delete drive letter assignment

  2. Change & Delete Windows Drive Letters with DriveLetterView

    delete drive letter assignment

  3. How to change/assign a drive letter in Windows 10

    delete drive letter assignment

  4. What Is A Drive Letter

    delete drive letter assignment

  5. How to Remove a Drive Letter in Windows 10?

    delete drive letter assignment

  6. Change & Delete Windows Drive Letters with DriveLetterView

    delete drive letter assignment

VIDEO

  1. Video Cover Letter/Resume for Assignment 2

  2. Internship Cover Letter Assignment

  3. Why is Windows in the C:/ Drive?

  4. Cara Mengganti Letter Drive Pada Windows

  5. How to Remove Drive Letter on Windows 11

  6. How to Change Drive Letter in Windows 11?

COMMENTS

  1. Remove 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: "G") you want to remove.

  2. 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.". If you are using Windows 8, press "Win + X" to open the power user menu and select the ...

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

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

  4. windows

    30. The command to remove a drive letter - which shouldn't be needed, but hey, Win10, there are still some bugs - is mountvol <drive> /D, so for you it would be mountvol S: /D and mountvol T: /D. You can also try mountvol /R, which should remove all drive letter assignments for which there is no currently mounted drive.

  5. How to remove drive letter on Windows 11

    Select the drive with the volume with the letter to remove. Select the volume and click the Properties button. Click the "Change drive letter" button. Select the None option to remove the drive letter on Windows 11. Click the OK button. Once you complete the steps, the system will remove the drive letter on Windows 11.

  6. How to Remove a Drive Letter in Windows 10

    Let's review these methods. To remove a drive letter in Windows 10, do the following. Press the Win + X keys together. In the menu, select Disk Management. In Disk Management, right-click on the partition whose drive letter you would like to change. Select Change Drive Letter and Paths in the context menu.

  7. 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. In our case our hard drive is Volume 3 ...

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

    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.

  9. Change and Assign Drive Letter in Windows 10

    1 Open an elevated PowerShell. 2 Type Get-Partition into the elevated PowerShell, and press Enter. (see screenshot below) 3 Make note of the drive letter (ex: "G") of the drive you want to change. 4 Type the command below into the elevated PowerShell, and press Enter.

  10. Remove Drive Letter in Windows 11 Tutorial

    This tutorial will show you how to remove a drive letter in Windows 10 and Windows 11. Windows will automatically mount new basic volumes that are added to the system, and assign them drive letters by default. A drive letter is a single alphabetic character A through Z that has been assigned by Windows to a physical drive or drive partition connected to the computer to reference the drive by.

  11. How to Remove Drive Letter in Windows 11

    Remove Drive Letter in Windows 11. The easiest way to remove a drive letter is the Settings app. Remove Drive Letter in the Settings app. Press Win + I to open the Settings app.; Click System on the left, and then select Storage on the right. đź’ˇType ms-settings:storagesense in the Run box (Win + R) to open this page directly.; Now click Advanced storage settings to expand it open, and then ...

  12. How to Remove the Drive Letter in Windows 10

    Press the Win + E keys to open File Explorer, then click the View tab from the ribbon toolbar and click Options. Step 2. When the Folder Options window pops up, click the View tab. Then find and uncheck Show drive letters box under the Advanced settings section. Click Apply and OK sequentially to save changes.

  13. How to remove drive letters in Windows

    Removing drive letters using the command prompt. You need elevated rights to remove a drive letter using the command prompt: Tap on the Windows-key to display the Start Menu. Type cmd.exe, hold down the Shift-key and Ctrl-key, and select the item from the list of results. Confirm the UAC prompt.

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

    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.

  15. Removing Old Drive Letter Assignments

    Press the Windows key+X choose Disk Management.In the lower pane you will see all of your drives. Right click the D: drive and choose Change Drive Letter or Paths.and choose any drive letter not being used.That will free up D: and you can now right click any other drive choose to Change Drive Letter or Paths and choose it to be D: Once you reboot, it will permanently assign the drive letters.

  16. View / Change / Remove drive letters assignment in your system

    Allows you to delete a drive letter from command line, for example: DriveLetterView.exe /delete local k: DriveLetterView.exe /delete network g: /stext <Filename>. Save the drive letters list into a regular text file. /stab <Filename>. Save the drive letters list into a tab-delimited text file. /scomma <Filename>.

  17. Drive Letter

    A) Right click on a listed drive, partition, or volume letter that you want to remove the drive letter of, and click/tap on Change Drive Letter and Paths. B) Click/tap on the Remove button. (see screenshot below) C) Click/tap on Yes to confirm removing the drive letter. (see screenshot below) 8.

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

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

  19. How Stop Disk Management (Win10) Assigning Drive Letters

    Remove drive letters from Disk Management by following the steps: 1. Press the Windows + X key and choose Disk Management from the menu that appears on your screen. 2. When Disk Management opens, right-click on the drive you want to remove the letter for and select Change Drive Letter and Paths option.

  20. PowerTip: Use PowerShell to Remove Drive Letter

    Summary: Learn how to use Windows PowerShell to remove an assigned drive letter from a partition.. How can I use Windows PowerShell to remove a drive letter from a partition? Use a combination of three cmdlets with the drive letter—for example, to remove drive letter X from the drive it is assigned to, use

  21. How to Remove Unpopulated Drive Letters

    For each non-existent drive appearing in Disk Management, the following was performed: 1. Right Click each non-existent drive one at a time and select Properties. 2. When the Properties opened there are the General, DVD Region, Volumes, Driver, Details and Events tabs. Click the Driver tab and then select Disable.

  22. How do I remove a permanently-assigned drive letter?

    Use Diskpart command to remove the drive letter or use the Device Manager to uninstall the driver for the USB drive. Remove Drive Letter in Windows 10. I should have said "assigned drive letter." To me it seems "permanent" because every time I connect the drive, Windows assigns the same drive letter. The tutorial you linked to shows how to ...

  23. Remove all saved USB drive letter assignments

    The problem was that sometimes Device Manager seemed to get confused and I would have to assign drive letters manually to make USB keys work. After cleaning out "Disk Drives" and "USB Controllers" the auto detection and letter assignment would work properly again. By "clean out" I mean deleting each of the grayed out entries.

  24. How to create a drive partition in Windows

    4. Virtual Hard Disk Type. You can select Fixed Size or Dynamically Expanding as your VHD type. When you create a virtual hard drive with a fixed size, the entire amount of storage space is ...