Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Windows 10 / Windows Doesn’t Automatically Assign Drive Letters

June 19, 2023 Windows 10Windows 11

Windows Doesn’t Automatically Assign Drive Letters

Windows automatically assigns a drive letter to any connected HDD/SSD disk, USB flash drive, SD card if it recognizes the file system on its partitions. But sometimes it doesn’t work. For example, when connecting a drive, a message appears indicating that a new device is being installed, the disk appears in Device Manager, but is not displayed in File Explorer. How to manually assign a drive letter on Windows 10 and 11, or enable automatic assignment of a drive letter to new drives?

Contents:
  • How to Manually Assign a Permanent Drive Letter in Windows?
  • Changing Drive Letter via CMD or PowerShell
  • Windows Doesn’t Save an Assigned Drive Letter for Connected USB Drives

How to Manually Assign a Permanent Drive Letter in Windows?

If the drive doesn’t appear in Windows Explorer, it will have to manually assign a drive letter through the Disk Management snap-in (diskmgmt.msc). To do this, open the Computer Management console (via the Win + X menu) and go to the Storage section -> Disk management. In the list of drives, locate the connected removable USB drive. As you can see, the disk is online, it has one healthy partition with the NTFS, but it is not assigned a drive letter. To assign a drive letter to it, right-click on the partition and select “Change Drive Letter and Path“.

Computer Management Change Drive Letter and Path

In the window that appears, click the “Add” button, select “Assign the following drive letter”, select the letter you want to assign to the drive (for example, H: ) in the drop-down list, and click OK.

Assign the following drive letter to the usb flash drive

Make sure that Windows detects the partition (s) on the connected USB drive and the partition is formatted with the NTFS, FAT32, or exFAT file system. If the file system is detected as RAW, or the disk is not partitioned, most likely the USB flash drive is just a new one, or the partition table is damaged and you have to repair the file system first.

If the disk is new and no partitions have been created on it, it appears in the console as Not initialized with an Unallocated area. To initialize such a disk:

  1. Right-click on it and select Initialize Disk;initialize new disk in windows
  2. Select the partition table for your disk: MBR or GPT;
    You can convert MBR-disk to GPT without data loss.
  3. It remains to click on the unallocated space and create a partition (New Simple Volume) on it, select the file system, format, and assign a drive letter.create partition on disk

If the disk is offline, right-click on it and select Online.

make disk online on windows

If the disk goes offline every time you restart Windows, fix it using the guide “The disk is offline because of policy set by an administrator”.

Changing Drive Letter via CMD or PowerShell

You can assign or change a drive letter from the command prompt using the Diskpart tool or using PowerShell.

Open the elevated command prompt and run the command:

Diskpart

List the volumes on the disks:

List vol

In this example, the TestDisk volume is not assigned a drive letter (empty in the Ltr column)

Windows doesn’t automatically assign a drive letter to the hidden System Reserved partition and the boot EFI partition.

Select this volume (Volume 4 in our example):

Sel vol 4

Assign a drive letter Q: to this volume:

Assign letter=Q

DiskPart successfully assigned the drive letter or mount point.

End the diskpart session:

Exit

assigning drive letter using diskpart cmd

You can also change or assign a drive letter using the PowerShell cmdlets from the built-in Disk Management module.

List drives:

Get-Disk

List partitions on the specified disk:

get-disk 1|Get-Partition

Assign the letter Q: to partition 2 on disk 1:

Get-Partition -DiskNumber 1 -PartitionNumber 2 | Set-Partition -NewDriveLetter Q

using powershell to assign drive letter to the partition on the USB drive

After that, the connected USB disk appears in the File Explorer with the assigned drive letter.

Windows Doesn’t Save an Assigned Drive Letter for Connected USB Drives

Sometimes after disconnecting a USB device or restarting the computer, a drive letter is not automatically assigned to it. I have to assign the letter again manually through Disk Management, and that becomes annoying.

It seems that some feature of automatic detection and mounting of new partitions on the external storage devices is not working in Windows. How to solve this problem?

First of all, make sure that the Virtual Disk service is running. You can check the status of this service in the services management console (services.msc).

start virtual disk serviceAlso, you can check the service from the command prompt:
sc query vds

SERVICE_NAME: vds
TYPE               : 10  WIN32_OWN_PROCESS
STATE              : 1  STOPPED
WIN32_EXIT_CODE    : 0  (0x0)
SERVICE_EXIT_CODE  : 0  (0x0)
CHECKPOINT         : 0x0
WAIT_HINT          : 0x0

sc query vds

Or check the service state using PowerShell:

get-service vds

check virtual disk service running via powershell

If the service is stopped, start it from the graphical snap-in (Start button) or using the command:
net start vds
net start vds

Tip. In some cases, for the Virtual Disk service to work correctly, you need to change its startup type to Automatic (otherwise you will get the “Unable to connect to the Virtual Disk service” error).

Check if the problem persists. If it does, make sure that the automatic mounting of new volumes is enabled.

Note. When the automount is enabled, Windows automatically mounts the file systems of new drives connected to the computer and assigns drive letters to the partitions. If the automount is disabled, Windows detects new drives but doesn’t automatically mount them or assign drive letters to the new volumes.

Open the command prompt as administrator and run the following commands:
diskpart
Within diskpart, make sure that the automatic mounting of new volumes is enabled:
DISKPART> automount

Automatic mounting of new volumes disabled.

As you can see, the auto-mounting is disabled. Let’s enable it:
DISKPART> automount enable

Automatic mounting of new volumes enabled.

Exit diskpart
DISKPART> exit

Enable automount with diskpart

You can also enable automatic mounting of new partitions using the command:

MOUNTVOL /E

Make sure the NoAutoMount DWORD parameter (with a value of 1) is not created under the reg key HKLM\SYSTEM\CurrentControlSet\Services\mountmgr. If this registry parameter is created, Windows doesn’t assign drive letters to newly connected devices.

Note. By the way, the automount is also responsible for making Windows remember the drive letters assigned to the removable drives. The automount feature will assign the same drive letters the next time the USB drive is connected to your computer (of course, if these letters are not busy). A list of saved drive letters assigned to partitions is stored under the registry key HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices.

list of saved drive letters assigned to disk in windows registry

To clear the saved associations of partitions with drive letters, use the command DISKPART>automount scrub or mountvol /r.

Restart your computer and verify if the drive letters are assigned to the external USB devices.

If not, check if the “hidden” and “do not assign a drive letter” attributes are set for the partition on the USB drive. Run the Diskpart command prompt and enter the following commands:

  1. List the disks: list disk
  2. Find the disk number assigned to your USB flash drive (in this example 1) and select it: select disk 1
  3. List the partitions on the disk: list part
  4. Select the desired partition: select partition 2
  5. Check the partition attributes: attributes volume
  6. As you can see, the “Hidden” and “No Default Drive Letter” attributes are enabled for this volume;volume attributes
  7. Disable these attributes with commands:
    attributes volume clear NoDefaultDriveLetter
    attributes volume clear hidden
    Volume attributes cleared successfullyclear volume attributes NoDefaultDriveLetter and hidden
  8. End the diskpart session by typing: exit

After that, this partition on the USB flash drive should be automatically assigned a drive letter on any computer.

Please note that the old Windows versions only see the first partition on USB sticks with multiple partitions. The ability to create multiple partitions on removable USB drives appeared only starting from Windows 10 build 1703. Previously, in order to make second and subsequent partitions on the USB flash drive were accessible in Windows, you had to use a trick to make Windows detect removable USB flash drive as an HDD.

If your USB flash drive doesn’t appear in the Disk Management console, try using a different USB port or cable. Try to connect the USB flash drive directly to the computer (without the USB hub), check whether the power is on and whether it is detected on other computers.

26 comments
18
Facebook Twitter Google + Pinterest
previous post
IdFix: Preparing On-Prem Active Directory Sync with Azure
next post
Install and Configure a Read-Only Domain Controller (RODC) on Windows Server 2019/2022

Related Reading

Zabbix: How to Get Data from PowerShell Scripts

October 27, 2023

Tracking Printer Usage with Windows Event Viewer Logs

October 19, 2023

How to Use Ansible to Manage Windows Machines

September 25, 2023

Installing Language Pack in Windows 10/11 with PowerShell

September 15, 2023

How to View and Change BIOS (UEFI) Settings...

September 13, 2023

26 comments

doug April 29, 2015 - 4:05 pm

Thanks, this worked great! 

Reply
Alton August 1, 2015 - 6:50 pm

Finnally something that worked. 4  of my 9 USB keys no longer mount on my computer but worked on my wife’s so I knew it was a Windows problem. Gave up a year ago trying to solve the problem because none of the solutions on the web worked – and there are tons of them. So after loading Win 10 thought I would see if my keys worked they still didn’t so I did a google and this solution pooped up.
 

Reply
Asghar January 31, 2016 - 4:58 am

This fix worked like charm. Thanks for posting friend.

Reply
Jan May 9, 2016 - 2:50 pm

Great help! Thank a lot!

Reply
Ark May 31, 2016 - 8:54 am

Very helpful! Thank you very much!

Reply
Coral Bay CC June 9, 2016 - 4:23 pm

You rock!!!!  Been fighting this on a SBS 2011 server.  Enabling automount did the trick.
Thanks SO much!!

Reply
Hutch December 3, 2016 - 7:02 pm

Well done – automount worked like a dream in Windows10 Anniversary edition (on my laptop). Many thanks.

Reply
Sompop March 18, 2017 - 5:53 am

Good Job. Thank you verry much.

Reply
Virender Saini April 2, 2017 - 5:48 am

Virtual Disk service is running
aoutomount is anabled already
disk drive is showing in device manger
but drives still not shown in my computer

win 7 ultimate service pack 1 fully updated

plz help

Reply
urix June 16, 2017 - 9:19 am

Thank you!

I had exact problem and this solution helped me.

Reply
AT April 6, 2019 - 12:17 am

Thanks a lot!
It solved my problem!

Reply
Usman May 28, 2019 - 4:18 pm

every thing checked and correct but nothing is working for me
windows 10 64 bit pro
and USB flash drive is 16 GB Sandisk 3.0

Reply
Usman May 28, 2019 - 4:20 pm

And USB Drive is showing in Disk Management with its full capacity.

Reply
Andreas January 6, 2020 - 4:07 pm

After reinstalling Windows my Data disk for some reason became hidden.. I couldnt figure out why it wouldnt auto mount but this solved it. Literally the only page on the internet that had the solution thanks fellas 🙂

Reply
MM January 18, 2020 - 7:20 am

Thank you, mine was fixed in diskpart

Reply
jaz March 29, 2020 - 7:26 am

Thank you very much! I resolved my issue by setting the attribute of my disk. Thanks!!!

Reply
Chris July 12, 2020 - 3:47 am

Thanks for the post, the part about the hidden drive attribute helped. No idea how it got set to Yes but I cleared it and it mounts fine again.

Reply
MJ July 17, 2020 - 10:16 pm

Thank you very much!. I was also able to resolve this by changing attributes of the external SSD.

Reply
superpanda July 26, 2020 - 9:27 pm

Thank you very much. It solved my issues with the windows media creation tool

Reply
Alex September 20, 2020 - 1:33 am

Excelent way of dealing with this issue!, Thank you very much!

Reply
Kamil October 17, 2020 - 9:10 pm

Thanks, It’s working! It solved my problem!

Reply
Gyorgy Bakocs December 11, 2020 - 2:32 am

Widows is the stupidest OS I have ever used. (For some reason I have to use it sometimes.) I formatted a brand new SSD on Windows (NTFS). Then I used this SSD on my Linux Mint without any problem for weeks. My colleague copied some data from it to his MAC. There were no problems. And now I plugged in again to that Windows shit, and it sees RAW fs. Why anybody pays a dollar for this OS, I really do not understand.

Reply
MartyvH December 25, 2020 - 4:31 am

Great article! But all the measures above were fine and not the problem with my USB, a S$47 SanDisk 64GB stick (bought in Singapore but no warranty as I don’t live in Singapore and can’t get there at the moment….) My problem was that it just wouldn’t assign a drive letter. I was about to throw it in the bin. It said Healthy in Disk Management, you just couldn’t browse it. I assigned a drive letter and then the stick immediately opened in File Explorer. I restarted the computer, plugged in the stick and it again automatically recognised!

Reply
Kyr Gatos January 3, 2022 - 1:08 pm

This solution does not work when i connect my tablet (Samsung Galaxy, model SM-T580, Android 7).
Windows 10 sees it, I can transfer files between tablet and pc but only manually. If I want to use XCOPY in a .bat file, to copy hundreds of pictures every week, I can’t because there isn’t any Drive letter assigned to tablet.
Any thoughts???

Reply
Jonathan Cannet March 9, 2022 - 12:38 am

Worked fine for Seagate External 1 gb drive accidently formatted.

Reply
Special December 21, 2022 - 10:39 am

Thanks for the awesom tips. It worked. My external Hard disk’s volume was “hidden”!!!!

Reply

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Zabbix: How to Get Data from PowerShell Scripts

    October 27, 2023
  • Tracking Printer Usage with Windows Event Viewer Logs

    October 19, 2023
  • PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

    October 15, 2023
  • Reset Root Password in VMware ESXi

    October 12, 2023
  • How to Query and Change Teams User Presence Status with PowerShell

    October 8, 2023
  • How to Increase Size of Disk Partition in Ubuntu

    October 5, 2023
  • How to Use Ansible to Manage Windows Machines

    September 25, 2023
  • Installing Language Pack in Windows 10/11 with PowerShell

    September 15, 2023
  • Configure Email Forwarding for Mailbox on Exchange Server/Microsoft 365

    September 14, 2023
  • How to View and Change BIOS (UEFI) Settings with PowerShell

    September 13, 2023

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • How to Repair EFI/GPT Bootloader on Windows 10 or 11
  • How to Restore Deleted EFI System Partition in Windows
  • Network Computers are not Showing Up in Windows 10/11
  • Updating List of Trusted Root Certificates in Windows
  • How to Create a Wi-Fi Hotspot on your Windows PC
  • How to Sign an Unsigned Device Driver in Windows
  • How to Download APPX File from Microsoft Store for Offline Installation?
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top