guidox / PC

Find Out Which Physical Disk a Drive Letter Belongs To

TL;DR

Follow the chain with **Get-Partition**, **Get-Disk** and the storage stack, then confirm the serial number with **Get-PhysicalDisk**. Letters map to partitions, partitions map to disks.

Before you start

Requirements

  • Windows 11
  • Admin rights for the disk details
  • 10 minutes
Step by step

Instructions

01

List volumes and drive letters

**Get-Volume** shows every volume with its letter, label, file system and size. A volume without a letter is the first thing to notice.

Get-Volume | Select-Object DriveLetter,FileSystemLabel,FileSystem,HealthStatus,SizeRemaining,Size | Sort-Object DriveLetter
Get-PSDrive -PSProvider FileSystem | Select-Object Name,Root,Used,Free
02

Link letters to partitions

**Get-Partition** carries both the drive letter and the disk number. That single table is the join between the two worlds.

Get-Partition | Select-Object DiskNumber,PartitionNumber,DriveLetter,Size,Type,IsBoot,IsActive | Sort-Object DiskNumber,PartitionNumber
Get-Partition -DriveLetter C | Format-List
03

Identify the physical disk

**Get-Disk** adds the model, the bus type and the serial number. A disk that reports **Unhealthy** or **No Media** is the one to work on.

Get-Disk | Select-Object Number,FriendlyName,SerialNumber,BusType,HealthStatus,OperationalStatus,Size
Get-PhysicalDisk | Select-Object DeviceId,FriendlyName,MediaType,BusType,HealthStatus,SerialNumber
04

Handle the same disk shown twice

**Get-Disk** numbers and **Get-PhysicalDisk** DeviceIds do not always agree, especially with a RAID controller. The serial number is the stable identifier.

Get-Disk | ForEach-Object { $d=$_; $p = Get-PhysicalDisk | Where-Object SerialNumber -eq $d.SerialNumber; [pscustomobject]@{Disk=$d.Number; Model=$d.FriendlyName; Serial=$d.SerialNumber; PhysDevId=$p.DeviceId} }
Get-CimInstance Win32_DiskDrive | Select-Object Index,Model,SerialNumber,InterfaceType,Size
05

Read the on-disk signatures

The partition table GUID names the disk even after it moves to another port. That is what makes a disk identifiable in a machine where the numbers changed.

Get-Disk | Select-Object Number,FriendlyName,UniqueId,Path,PartitionStyle
Get-Partition -DiskNumber 0 | Select-Object PartitionNumber,DriveLetter,Offset,GptType
06

Record the mapping

A saved table turns the next incident into a lookup. Keep it next to your backup notes, because it survives a dead machine only as a file.

Get-Partition | Where-Object DriveLetter | Select-Object DriveLetter,DiskNumber,PartitionNumber,@{n='Disk';e={ (Get-Disk -Number $_.DiskNumber).FriendlyName }},@{n='Serial';e={ (Get-Disk -Number $_.DiskNumber).SerialNumber }} | Export-Csv "$env:USERPROFILE\drive-map.csv" -NoTypeInformation
Import-Csv "$env:USERPROFILE\drive-map.csv"
Troubleshooting

Common issues

Get-Partition shows no drive letter

The volume is mounted in a folder, or the letter was removed. Assign one with Set-Partition -NewDriveLetter.

The disk number changed after a reboot

Disk numbers are assigned at enumeration. Match by serial number, never by number, when you script anything.

A disk is missing from Get-Disk

It is offline. Check Get-Disk for an Offline status and bring it online with Set-Disk -IsOffline $false.

The serial number is empty

A USB bridge hides it. The Win32_DiskDrive PNPDeviceID holds the alternative identifier.

FAQ

Frequently asked

Does a drive letter survive a reinstall?

Usually not. The letters come from the mount manager and are reassigned; the partition GUID is the stable part.

Why do two volumes share a letter?

They cannot. What looks like a duplicate is usually a mounted folder or a subst drive.

Is it safe to change a letter?

For a data drive yes; installed programs store absolute paths and break. Change letters before installing, not after.

How to undo this

Nothing is changed by reading. If you assigned a drive letter, remove it with Remove-PartitionAccessPath -DiskNumber 0 -PartitionNumber 1 -AccessPath 'E:\'.

Changelog · 1 entry
  1. 2026-11-01
    First version
Interactive version: checklist, feedback, related guides →

Free · no account needed · tracks your progress