Find Upgradeable vShield Edges

I was recently asked if there was a quick way to find out how many vShield Edges were out-of-date and could be upgraded in a vCloud Director environment. I didn’t know of any, so I turned to my good friend PowerCLI and came up with this:

This script does assume that at least one of the vShield Edges in your environment is up-to-date, as it looks for the highest available version deployed and not the known latest version.