We had a requirement to find the VM with RDM which holds specific naa ID. The following one-liner made our task easy.
1 2 |
Get-VM | Get-HardDisk-DiskType"RawPhysical","RawVirtual" | where {$_.ScsiCanonicalName -eq "naa.60008ac00071254a"} | Select-Object Parent, ScsiCanonicalName |