Skip to content

Commit

Permalink
fix for non-english hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaromir Kaspar committed Feb 8, 2021
1 parent c4d5995 commit 9f472e0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Scripts/3_Deploy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1532,7 +1532,12 @@ If (-not $isAdmin) {
#Enable Guest services on all VMs if integration component if configured
if ($labconfig.EnableGuestServiceInterface){
WriteInfo "`t Enabling Guest Service Interface"
Get-VM -VMName "$($labconfig.Prefix)*" | Where-Object {$_.state -eq "Running" -or $_.state -eq "Off"} | Enable-VMIntegrationService -Name "Guest Service Interface"
$vms = Get-VM -VMName "$($labconfig.Prefix)*" | Where-Object {$_.state -eq "Running" -or $_.state -eq "Off"}
foreach ($vm in $vms) {
$guestServiceId = 'Microsoft:{0}\6C09BB55-D683-4DA0-8931-C9BF705F6480' -f $vm.Id
$guestService = $vm | Get-VMIntegrationService | Where-Object -FilterScript {$_.Id -eq $guestServiceId}
$guestService | Enable-VMIntegrationService
}
$TempVMs=Get-VM -VMName "$($labconfig.Prefix)*" | Where-Object {$_.state -ne "Running" -and $_.state -ne "Off"}
if ($TempVMs){
WriteInfoHighlighted "`t`t Following VMs cannot be configured, as the state is not running or off"
Expand Down

0 comments on commit 9f472e0

Please sign in to comment.