Hello Chad,
Its good script. But I am looking a script to get the selected VM or all the VMs who has DiskType -eq “RawPhysical”, details with Properties (Host, VM, DiskNumber, Identifier, Policy, VirtualDeviceNode, Capacity )
Can you assist ?
I tried this as below --
Function Get-RAWDiskInfo {
$RDisks = Get-VM $VM | Get-HardDisk | Where {$_.DiskType -eq “RawPhysical”}
Foreach ($RDisk in $RDisks) {
$Lun = Get-VMHost -name (Get-VM $VM).VMHost | Get-SCSILun $RDisk.SCSICanonicalName
$Props = @{ 'VM Name' = $RDisk.Parent;
'DiskType' = $RDisk.DiskType;
'Name' = $RDisk.Name;
'Filename' = $RDisk.Filename;
'Scsi Name' = $RDisk.ScsiCanonicalName;
'LUN ID' = $Lun.RuntimeName.Substring($Lun.RuntimeName.LastIndexof(“L”)+1)
}
New-Object -TypeName PSObject -Property $props
}
}