Integration components available for virtual machines not connected to Windows Update

In Technical Preview, Hyper-V began delivering integration components through Windows Update (see blog for more information).
Pushing updates through Windows Update was a good first step — it is the easiest way to keep integration components up to date.  There are situations, however, where the virtual machine isn’t connected to Windows Update and sometimes it is more convenient to patch an offline (turned off) virtual machine. 
Now, in addition to receiving integration component updates automatically through Windows Update, you can also update integration components on virtual machines that aren’t running or aren’t connected to Windows Update using the cab files available in KB3071740.  (Last time I looked, the download links weren’t working.  The downloads are here).
** Note:  Everything in this blog post applies to Server 2016 Technical Preview or Windows 10 and associated preview builds or later.  The instructions here should work for virtual machines on Server 2012R2/Windows 8.1 but that is not tested or supported! **
 
 
Updating integration components on an virtual machine that is not turned on
These instructions assume you are updating the integration components on a vhd for a virtual machine that is not running from the Hyper-V host.
First, find the cab file that matches the operating system running in your virtual machine and download it.
** For step by step instructions with explanations read this post but use the cabs from the KB article.

Run the following in PowerShell as administrator.  Remember to set the right paths to your VHD and downloaded cab file.
$virtualHardDiskToUpdate=”D:client_professional_en-us_vl.vhd”$integrationServicesCabPath=”C:UserssarahDownloadswindows6.2-hypervintegrationservices-x86.cab”#Mount the VHD$diskNo=(Mount-VHD -Path $virtualHardDiskToUpdate –Passthru).DiskNumber#Get the driver letter associated with the mounted VHD, note this assumes it only has one partition if there are more use the one with OS bits$driveLetter=(Get-Disk $diskNo | Get-Partition).DriveLetter#Check to see if the disk is online if it is not online itif ((Get-Disk $diskNo).OperationalStatus -ne ‘Online’){Set-Disk $MountedVHD.Number -IsOffline:$false -IsReadOnly:$false}#Install the patchAdd-WindowsPackage -PackagePath $integrationServicesCabPath -Path ($driveLetter + “:”)#Dismount the VHDDismount-VHD-Path $virtualHardDiskToUpdate
 
 
Update integration components inside the virtual machine without using Windows Update
These instructions assume you are running on the virtual machine you want to update.
First, find the cab file that matches the operating system running in your virtual machine and download it.  Run the following in PowerShell as administrator.  Remember to set the right path to the downloaded cab file.
$integrationServicesCabPath=”C:UserssarahDownloadswindows6.2-hypervintegrationservices-x86.cab”#Install the patchAdd-WindowsPackage -Online -PackagePath $integrationServicesCabPath
Now your virtual machines can all have the latest integration components!

Cheers,Sarah

http://blogs.technet.com/b/virtualization/archive/2015/07/24/integration-components-available-for-virtual-machines-not-connected-to-windows-update.aspx