A while ago I did a blog post that showed you how easy it was to check what version of the Integration Services were installed inside your virtual machines. However, a number of people came back to me and said: “Ben, I do not really care about the version number of the integration services – what I want to know is whether I need to update the integration services or not”.
That is a much trickier problem to solve. In fact, in Windows Server 2008 and Windows Server 2008 R2 it is not really possible to write a good script that will do this. Luckily, it is possible to write a script for this in Windows 8 / Windows Server 2012. Unfortunately, it is not the simplest script around.
There are a couple of reasons for this:
- You can’t do this with the Hyper-V PowerShell cmdlets, you need to go straight to WMI
- This information is only available through GetSummaryInformation – which is a rather strange interface
With that in mind – here is the script that will get you the information you need:
If I run this script on one of my Hyper-V servers – I get this:
Looks like I need to do a lot of integration service updates. Bummer.
But getting back to the script – what is GetSummaryInformation and why is it so tricky to use? GetSummaryInformation is a WMI method that we implemented to allow people to get a lot of random information about virtual machines in a quick and efficient method. The way it works is that you call it and pass in an array of numbers – this array indicates the information that you want to get about the virtual machines. You can read all of the possible options here: http://msdn.microsoft.com/en-us/library/hh850217(v=vs.85).aspx
One final note – in order to get the Integration Services state – you need to use the WMI v2 namespace.