If you want get the RDMs defined in your vmware environment using PowerCLI, then you can just use this:
$allvms = Get-VM
foreach ($vm in $allvms) {
$vmrdm = Get-HardDisk -VM $vm -DiskType "RawPhysical","RawVirtual"
foreach ($rdm in $vmrdm) {
if ($rdm.Name) {
$row = "" | select Parent,Name,DiskType,ScsiCanonicalName,DeviceName,FileName,CapacityGB
$row.Parent = $rdm.Parent
$row.Name = $rdm.Name
$row.DiskType = $rdm.DiskType
$row.ScsiCanonicalName = $rdm.ScsiCanonicalName
$row.DeviceName = $rdm.DeviceName
$row.FileName = $rdm.FileName
$row.CapacityGB = ($rdm.CapacityKB/1024)/1024
$report += $row } # End if ($rdm.Name)
} # End foreach ($rdm in $vmrdm)
} # End foreach ($vm in $allvms)
$report
(Remember to use the Connect-VIServer cmdlet before!)
Best regards,
Pablo
P.D: Got from this vmware's KB