Those are Windows Object Manager device names for disk volumes. If you are okay with installing NtObjectManager PowerShell module, then listing them is as simple as:
ls NtObject:\Device | ? {$_.Name -match 'HarddiskVolume'}
You can find corresponding drive letters via something like
Get-Volume | % { ($_.DriveLetter) ? (Get-NtSymbolicLink "\??\$($_.DriveLetter):") : $Null }
If installing additional module is not an option, more universal solution would be to use Win32 API directly (QueryDosDevice).
Short version:
$Kernel32 = Add-Type -Name 'Kernel32' -Namespace '' -PassThru -MemberDefinition @"
[DllImport("kernel32")]
public static extern int QueryDosDevice(string name, System.Text.StringBuilder path, int pathMaxLength);
"@
$DevicePath = New-Object System.Text.StringBuilder(255)
$GetDevicePath = {$Kernel32::QueryDosDevice( `
$_.UniqueId.TrimStart('\?').TrimEnd(''), $DevicePath, $DevicePath.Capacity) | Out-Null; $DevicePath}
Get-Volume | ft DriveLetter, FileSystemLabel, @{n='DevicePath';e=$GetDevicePath}, UniqueId
More verbose and error-prone version:
$Kernel32 = Add-Type -Name 'Kernel32' -Namespace '' -PassThru -MemberDefinition @"
[DllImport("kernel32", SetLastError = true)]
public static extern int QueryDosDevice(string name, System.Text.StringBuilder path, int pathMaxLength);
"@
$DevicePath = New-Object System.Text.StringBuilder(255)
Get-Volume | % {
if ($.UniqueId -match '(Volume{.*})') {
$VolumeName = $Matches[1]
} else {
Write-Host "Unable to lookup volume name in '$($.UniqueId)'"
Return
}
$ReturnLength = $Kernel32::QueryDosDevice($VolumeName, $DevicePath, $DevicePath.Capacity)
if ($ReturnLength) {
[PSCustomObject]@{
DriveLetter = $.DriveLetter
Label = $.FileSystemLabel
FileSystem = $.FileSystem
"Size (GB)" = $.Size / 1GB
"Free (GB)" = $.SizeRemaining / 1GB
DevicePath = $DevicePath.ToString()
Id = $.UniqueId
}
} else {
$errorCode = [System.Runtime.InteropServices.Marshal]::GetLastPInvokeError()
Write-Host "Unable to query DOS device by '$VolumeName'." (New-Object System.ComponentModel.Win32Exception($errorCode)).Message
}
} | ? { $_.DevicePath } | Sort-Object DevicePath | ft