I had some problem with retreiving IDE targets from the get-scsicontrollerd cmd.
Once I made a simple (not the best) script to retreive IDE or SCSI information from the Controllerkey.
Like I said, it could be made probably a lot easier and faster.
AFAIK
IDE Controllerkey = 200
SCSI Controllerkey = 1000
So also could change the script to match 1000 else set it to unknown or something similar
$Report = @()
$VMs = Get-VM
foreach ($VM in $VMs){
$Disks = Get-HardDisk -VM $VM
foreach ($disk in $Disks){
if ($disk.ExtensionData.ControllerKey -eq "200") {
$Row = "" | select Cluster,VM,Disk,Controller,Filename
$Row.Cluster = get-cluster -vm $VM
$Row.VM = $disk.Parent
$Row.Disk = $disk.Name
$Row.Controller = "IDE"
$Row.Filename = $disk.Filename
$Report += $Row
}
elseif ($disk.ExtensionData.ControllerKey -ne "200"){
$Row = "" | select Cluster,VM,Disk,Controller,Filename
$Row.Cluster = get-cluster -vm $VM
$Row.VM = $disk.Parent
$Row.Disk = $disk.Name
$Row.Controller = "SCSI"
$Row.Filename = $disk.Filename
$Report += $Row
}
}
}
$report|ft -a