From 15f6bed869ccf55836404938e7999ac530d1807c Mon Sep 17 00:00:00 2001 From: Marvin Heimbrodt Date: Sat, 4 Dec 2021 18:04:58 +0100 Subject: [PATCH] fix: Enable-VMIntegrationService fails on non Englisch systems Enable-VMIntegrationService depends on the OS language and fails on non Englisch systems Credit for the fix goes to: https://dojoforums.altaro.com/topic/enabling-guest-service-interface-with-powershell-invalidargument-error/ --- Intune.HV.Tools/Private/New-ClientDevice.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Intune.HV.Tools/Private/New-ClientDevice.ps1 b/Intune.HV.Tools/Private/New-ClientDevice.ps1 index ffa6caf..2275676 100644 --- a/Intune.HV.Tools/Private/New-ClientDevice.ps1 +++ b/Intune.HV.Tools/Private/New-ClientDevice.ps1 @@ -31,7 +31,7 @@ function New-ClientDevice { } New-VM -Name $VMName -MemoryStartupBytes $VMMMemory -VHDPath "$ClientPath\$VMName.vhdx" -Generation 2 | Out-Null - Enable-VMIntegrationService -vmName $VMName -Name "Guest Service Interface" + Get-VMIntegrationService -vmName $VMName | ? Name -match 'Interface' | Enable-VMIntegrationService Set-VM -name $VMName -CheckpointType Disabled Set-VMProcessor -VMName $VMName -Count $CPUCount Set-VMFirmware -VMName $VMName -EnableSecureBoot On