Posted July 12, 20177 yr 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
Create an account or sign in to comment