LucD
Leadership
Leadership

Ok, try like this

Get-VM | Get-HardDisk -PipelineVariable hd |

Select @{N='VM';E={$_.Parent.Name}},Name,@{N='SCSIid';E={

    $ctrl = $hd.Parent.Extensiondata.Config.Hardware.Device | where{$_.Key -eq $hd.ExtensionData.ControllerKey}

    "$($ctrl.BusNumber):$($_.ExtensionData.UnitNumber)"}}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos