Not sure why you need the second select as
£> Get-Wmiobject -Class Win32_LogicalDisk |
Select @{n=’Drive’;e={$_.DeviceID.TrimEnd(‘:’)}}
Drive
—–
C
D
E
F
If you just want the drive letters then go with Dave’s suggestion or make it shorter liek this
(Get-Wmiobject -Class Win32_LogicalDisk).DeviceID.TrimEnd(‘:’)