VMware Cloud Community
Maledict
Contributor
Contributor
Jump to solution

Get a list of VM`s with type of controller

Hi guys,

sorry for dummy question, but i new noob in powershell i can not figure out how to get a list of VM`s with type of controller

I`d like to hva something looking like this:

name               controller

mega-vm          IDE

super-vm          paravirtual

tester-vm          lsi

Get-vm mega-vm | Get-ScsiController shows what scsi controller is in vm, but does not shows a VM name, and does not shows IDE at all (cause it get-scsi Smiley Wink) )

1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Try something like this

Get-VM |

Select Name,@{N='Controller';E={(Get-ScsiController -VM $_ | Select -ExpandProperty Type) -join '|'}}


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

View solution in original post

2 Replies
LucD
Leadership
Leadership
Jump to solution

Try something like this

Get-VM |

Select Name,@{N='Controller';E={(Get-ScsiController -VM $_ | Select -ExpandProperty Type) -join '|'}}


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

Maledict
Contributor
Contributor
Jump to solution

Thank You very much!!!!

0 Kudos