Get-PhysicalDisk options

June 19, 2017 PowerShell, Get-PhysicalDisk

reposted from Richard Siddaway's Blog - originally published May 31, 2017

These are the Get-PhysicalDisk options for identifying the disk you want

-UniqueId <string>
-ObjectId <string>
-FriendlyName <string>
-InputObject <CimInstance#MSFT_PhysicalDisk>
-StorageSubsystem <CimInstance#MSFT_StorageSubsystem>
-StorageEnclosure <CimInstance#MSFT_StorageEnclosure>
-StorageNode <CimInstance#MSFT_StorageNode>
-StoragePool <CimInstance#MSFT_StoragePool>
-VirtualDisk <CimInstance#MSFT_VirtualDisk>

When dealing with disks installed in the machine then the friendly names is the easiest to use

Get-PhysicalDisk | Format-List UniqueId, ObjectId, FriendlyName

UniqueId     : 60022480233DF060FE631B8A4EDD93A0  
ObjectId     : {1}\\W510W16\root/Microsoft/Windows/Storage/Providers_v2\SPACES_PhysicalDisk.ObjectId="{1dab9cf6-a1b4-11e6-a890-806e6f6e6963}:PD:{12e941a8-6125-c008-8806-8868642331ef}"  
FriendlyName : Msft Virtual Disk

UniqueId     : {d8e80f34-22bc-0a36-b302-d96abe30a6cc}  
ObjectId     : {1}\\W510W16\root/Microsoft/Windows/Storage/Providers_v2\SPACES_PhysicalDisk.ObjectId="{1dab9cf6-a1b4-11e6-a890-806e6f6e6963}:PD:{d8e80f34-22bc-0a36-b302-d96abe30a6cc}"  
FriendlyName : Samsung SSD 840 PRO Series  
You've successfully subscribed to Command Line Ninja
Great! Next, complete checkout for full access to Command Line Ninja
Welcome back! You've successfully signed in.
Unable to sign you in. Please try again.
Success! Your account is fully activated, you now have access to all content.
Error! Stripe checkout failed.
Success! Your billing info is updated.
Error! Billing info update failed.
Table fo contents