Quantcast
Channel: VMware Communities : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 180259

Get Hosts with Windows VM guests

$
0
0

Hi Community!   I just want to output to the screen or Excel all the VMhosts that have guest OSs that are Windows.

 

I tried something like

 

Get-vmhost | get-vm | get-vmguest | where-object {$_.OSFullName -like "*Windows*"}  <- of course, that just returns the VM Guests... I want to return the Hosts that are running the VMs too!

 

and I tried writing some expressions where the last bit evaluates to true, etc., but then I'm not sure how to best get the Host from that.

 

Any wisdom much appreciated... thanks!


Viewing all articles
Browse latest Browse all 180259

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>