With the release of vSphere we also got a new Hardware version of the VM. I created a PowerCLI script to inventory the VM’s, which are not upgraded yet.

Get-VM |% {Get-View $_.ID} |`

% {
$vmVersion = $_.Config.Version
$vmName = $_.Name

    if ($vmVersion -eq "vmx-04"){
        Write-Host $vmName "uses hardware version 4" 

Disconnect-VIServer -Confirm:$false

The output will look like this:



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.