I’ve been working on cleaning up my vSphere environment and found a very handy one-liner today. The full article can be found here:
http://frankdenneman.nl/2009/12/impact-of-mismatch-guest-os-type/
I took the suggestions in the comments and came up with the following:
Get-View -ViewType VirtualMachine | Where { $_.Guest.GuestFullname -ne $_.Summary.Config.GuestFullName } | Sort Name |Select-Object Name, @{N=”InstalledOS”;E={$_.Guest.GuestFullName}}, @{N=”SelectedOS”;E={$_.Summary.Config.GuestFullName}} | Out-GridView