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!