VMware Cloud Community
fborges555
Enthusiast
Enthusiast
Jump to solution

Find linux box

Hi Gurus

has anyone here have a PScli that I can use to find Linux box and its adapter type , that I can use.

Thanks

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Try something like this

Get-VM |

where{$_.ExtensionData.GuestFamily -ne 'windowsGuest'} |

Select Name,

   @{N='OS';E={$_.ExtensionData.Guest.GuestFullName}},

   @{N='vNICType';E={(Get-NetworkAdapter -VM $_).Type -join '|'}}

If you don't want to rely on the VMware Tools and you are sure that all your VMs were configured with the correct GuestId, you could do

Get-VM |

where{$_.GuestId -notmatch 'windows'} |

Select Name,

   @{N='OS';E={$_.GuestId}},

   @{N='vNICType';E={(Get-NetworkAdapter -VM $_).Type -join '|'}}


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

View solution in original post

Reply
0 Kudos
4 Replies
LucD
Leadership
Leadership
Jump to solution

Do you the VMware Tools installed on your VMs?
Which adapter, storage or network?


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

Reply
0 Kudos
daphnissov
Immortal
Immortal
Jump to solution

Please explain better what you mean. No idea what you're asking for.

Reply
0 Kudos
fborges555
Enthusiast
Enthusiast
Jump to solution

L.

The vast vm has VM tools install and I am looking at vmxnet3 adapter.

I have windows vm and Linux vm on my cluster and I would like to run a ps so I can come up with a list of only Linux and what type of adapter they have

Thanks L.

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Try something like this

Get-VM |

where{$_.ExtensionData.GuestFamily -ne 'windowsGuest'} |

Select Name,

   @{N='OS';E={$_.ExtensionData.Guest.GuestFullName}},

   @{N='vNICType';E={(Get-NetworkAdapter -VM $_).Type -join '|'}}

If you don't want to rely on the VMware Tools and you are sure that all your VMs were configured with the correct GuestId, you could do

Get-VM |

where{$_.GuestId -notmatch 'windows'} |

Select Name,

   @{N='OS';E={$_.GuestId}},

   @{N='vNICType';E={(Get-NetworkAdapter -VM $_).Type -join '|'}}


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

Reply
0 Kudos