In a previous post of mine about the importance of Integration Components I’ve explained why it is so important to install Integration Components. So keep in mind that when you update your Hyper-V host you also update the Integration Components. If you would check for a succesful update then you need to check te version of the Integration Components software. This can be done very easily.
First we create a text file named servers.txt. Then we open this text file and insert the name of our Hyper-V host or hosts. Next we create a file named CheckIC.PS1 in the same directory as the file where we create servers.txt. Open the file CheckIC.PS1 with Notepad and paste the following script in it:
function Get-IntegrationServicesVersion ($HVhost = $(throw “HVHost required”))
{
$kvps = Get-WmiObject -Namespace rootvirtualization -ComputerName $HVHost -Query “Select GuestIntrinsicExchangeItems From Msvm_KvpExchangeComponent”
foreach ($kvp in $kvps)
{
$vmkvp = $Kvp.GuestIntrinsicExchangeItems
$vmkvp | select-object @{Label=”VMHost”;Expression={$hvhost}},@{Label=”VMName”;Expression={([xml]$vmkvp[0]).instance.property[1].value}},@{Label=”ICVersion”;Expression={([xml]$vmkvp[14]).instance.property[1].value}} -first 1
}
}
foreach ($hvhost in get-content servers.txt) {Get-IntegrationServicesVersion $hvhost}
Save the file and start PowerShell. Then browse to the directory where you saved the files. Execute the script by typing CheckIC.PS1 and press enter. The result will be something like this:
[image not preserved in the archive]
This is an easy way tho check which version of Integration Components you’ve installed on your VM’s.