Wednesday, 30 December 2015

Find VM Attached RDM By WWN

In order to find an existing VM attached RDM by WWN use the script below;
Get-VM | Get-HardDisk -DiskType "RawPhysical","RawVirtual" | where {$_.ScsiCanonicalName -like "*WWN*"} | Select Parent, Name, DiskType, ScsiCanonicalName, DeviceName | fl
The output will look similar to the below if an RDM is found;

Parent                          : SERVER-NAME.domain
Name                            : Hard disk x
DiskType                     : RawVirtual
ScsiCanonicalName   : naa.WWN

DeviceName                : vml.DeviceName

No comments:

Post a Comment