September 29th, 2015

PowerTip: Use PowerShell to Find Where Drive Letter is Stored

Doctor Scripto
Scripter

Summary: Use the Get-Partition and Get-Disk cmdlets to identify data storage locations.

Hey, Scripting Guy! Question How can I use Windows PowerShell to easily figure out which disk a particular drive letter is on?

Hey, Scripting Guy! Answer Use Get-Partition with the drive letter and pipe the results to Get-Disk, for example:

Get-Partition –DriveLetter Z | Get-Disk

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.