During the course of my powershell learning, I realised this little one line script can help us to retrieve Hardware version from all the powered-on VMs which are running on old hardware version i.e version 4.
Get-VM | Where-Object {$_.PowerState -eq PoweredOn} | Where-Object {$_.version -lt "v7"}

Click to enlarge
Leave a Reply