Highlighted
Contributor
Contributor

Get a list of VM`s with type of controller

Jump to solution

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
Highlighted
User Moderator
User Moderator

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
Highlighted
User Moderator
User Moderator

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

Highlighted
Contributor
Contributor

Thank You very much!!!!

0 Kudos