This command maps physical disk hardware directly to its assigned logical drive letters on a Windows system. It is used to identify which physical drives house specific partitions without opening graphical interfaces.
The command runs Get-Disk
Copy
Search Site
Search Google
to inventory the physical drives on the system. It then uses a calculated property to pass each disk number into Get-Partition
Copy
Search Site
Search Google
, extracting any assigned drive letters. If a physical disk contains multiple partitions, the script combines the letters into a comma-separated list. The output displays as a clean console table showing the disk number, model name, total size, and child logical drives.
[PowerShell - Get Physical Drive and Logical Drive Letters]