Hi, i need your support to extract the drive letters of O.S with the RDMs LUNs
What is your guest OS?
use this , script would help to get listof RDMs with Hard disk number and respective hostname.
$report = @()
$vms = Get-VM | Get-View
foreach($vm in $vms){
foreach($dev in $vm.Config.Hardware.Device){
if(($dev.gettype()).Name -eq "VirtualDisk"){
if(($dev.Backing.CompatibilityMode -eq "physicalMode") -or
($dev.Backing.CompatibilityMode -eq "virtualMode")){
$row = "" | select VMName, VMHost, HDDeviceName, HDFileName, HDMode, HDsize, HDDisplayName
$row.VMName = $vm.Name
$esx = Get-View $vm.Runtime.Host
$row.VMHost = ($esx).Name
$row.HDDeviceName = $dev.Backing.DeviceName
$row.HDFileName = $dev.Backing.FileName
$row.HDMode = $dev.Backing.CompatibilityMode
$row.HDSize = $dev.CapacityInKB
$row.HDDisplayName = ($esx.Config.StorageDevice.ScsiLun | where {$_.Uuid -e $dev.Backing.LunUuid}
$report += $row
}
}
}
}
Thanks but i need it with drive letters and i'm using windows servers
any support