Comparing Exchange Version Numbers & Outputting available updates

Hi All

Hopefully someone will be able to help a PowerShell newbie!

I have a requirement to compare the version number of a Microsoft Exchange server to a list of all available versions and report back any updates in the same major version (i.e 14.x.x.x) which have not been installed. The list of available versions I am working off are here:

I am unsure how to store the version data tables, I was thinking maybe a CSV which can be updated whenever an update rollup or service pack is released but I’m not sure if there is any better way?

An example use:
I could have an exchange server on Update Rollup 5-v2 for Exchange Server 2010 SP2 which is version number 14.2.328.10 but as you can see from the link, there are 8 further updates in the major build 14.x.x.x. I have no problem retrieving the version number from exchange but my problem is comparing my installed version (in a variable for example) against the list of available versions and reporting back only the higher versions within the same major build as mine. I would also like the output to report all of the available columns from that website so my example output would just be string(s) like:

Available updates not installed:
Update Rollup 6 for Exchange Server 2010 SP2 14.2.342.3 2/11/2013 KB2746164
Update Rollup 7 for Exchange Server 2010 SP2 14.2.375.0 8/13/2013 KB2874216
Update Rollup 8 for Exchange Server 2010 SP2 14.2.390.3 12/10/2013 KB2903903
Microsoft Exchange Server 2010 SP3 2/12/2013 KB2808208
Update Rollup 1 for Exchange Server 2010 SP3 5/29/2013 KB2803727
Update Rollup 2 for Exchange Server 2010 SP3 8/13/2013 KB2866475
Update Rollup 3 for Exchange Server 2010 SP3 11/25/2013 KB2891587
Update Rollup 4 for Exchange Server 2010 SP3 12/10/2013 KB2905616

The results of this script would be used to create an alert in a monitoring system so just a text string would be fine for our purposes.

Thanks in advance for any help!

I’d use SQL server personally. Check out our ebook on historical and trend reports - there’s a module that makes writing to SQL dead easy.