Hi
I am looking for powercli script to identify which vmguest has RDM's attach to it and with LUN ID. Can you please help me how to execute that.
Thanks,
Siva.
Have a look at my yadr – A vdisk reporter post.
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Have a look at my yadr – A vdisk reporter post.
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi,
You can also start with this simple script
$report = @() Get-VM | % { $row = "" | select vm, ScsiCanonicalName, DeviceName $row.vm = $_.Name $hdd = $_ | Get-HardDisk | where { $_.DiskType -like "Raw" } $row.ScsiCanonicalName = $hdd.ScsiCanonicalName $row.DeviceName= $hdd.DeviceName $report += $row } $report
Regards,
Yasen
With PowerCLI 4.1 you can do this in a oneliner:
Get-VM | Get-HardDisk | Where-Object { $_.DiskType -like "Raw*"} | ` Select-Object -property @{N="VM";E={$_.Parent}},DiskType,Name,ScsiCanonicalName,DeviceName
Regards, Robert
I changed the 1-liner above to dump all the info for each RDM:
Get-VM | Get-HardDisk | Where-Object { $_.DiskType -like "Raw*"} | Format-List