PowerCLI

 View Only
  • 1.  find SCSI controller type of all VMs

    Posted Jan 06, 2009 03:20 PM

    Hello Guyz... help pls. how can i find the SCSI controller type of all the VMs in a particular datacenter



  • 2.  RE: find SCSI controller type of all VMs

    Posted Jan 06, 2009 04:39 PM

    You could try Hal's solution in



  • 3.  RE: find SCSI controller type of all VMs
    Best Answer

    Posted Jan 07, 2009 04:11 PM

    try this!

    # Get the VMs
    $vm = get-datacenter "DATACENTER" | get-vm 
    # For each of the VMs
    $vm | % {
        $vmview = get-view $_.id
    #    Get all of the SCSI controller devices
        $hardware = $vmview.config.hardware
        $devices = $hardware | % {$_.device}
        $deviceinfo = $devices | % {$_.deviceinfo}
        $controller = $deviceinfo | ? {$_.label -like "SCSI Contro*"}
        $controller | select-object @{name="Name"; expression={$vmview.name}}, @{name="Controller"; expression={$_.label}}, @{name="Controller Type"; expression={$_.summary}}
    }
    



  • 4.  RE: find SCSI controller type of all VMs

    Posted Jan 07, 2009 06:19 PM

    that ROCKS!!!



  • 5.  RE: find SCSI controller type of all VMs

    Posted Jan 07, 2009 06:30 PM

    lot easier to follow than the other script