Jump to content

Update Hyper V integration services


DigitalDentist

Recommended Posts

This script will update Hyper V integration services. Be sure and change your server names to match. Server0 is host and server1 is the Hyper V. Run on Host.

 

Get-VM -Name SERVER1 ComputerName server0
 
Set-VMDvdDrive -ComputerName server0 -VMName SERVER1 -Path 'C:\Windows\System32\vmguest.iso'
 
$DVDriveLetter = (Get-VMDvdDrive -ComputerName server0 -VMName SERVER1).Id | Split-Path Leaf
 
Invoke-Command ComputerName SERVER1 -ScriptBlock {
if ($ENV:PROCESSOR_ARCHITECTURE -eq 'AMD64')
{
$folder = 'amd64'
}
else
{
$folder = 'x86' 
}
Start-Process -FilePath 
"$($using:DVDriveLetter):\support\$folder\setup.exe" -Args '/quiet /norestart' -Wait 
}
 
Restart-Computer ComputerName SERVER1 -Wait -For WinRM -Force Set-VMDvdDrive -ComputerName server0 -VMName SERVER1 -ControllerNumber 1 -ControllerLocation 0 -Path $null
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...