Skip to content

Commit

Permalink
Only machine that are actually deployed should be taken into account
Browse files Browse the repository at this point in the history
  • Loading branch information
raandree committed Aug 16, 2021
1 parent 05cd962 commit 5d6842b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions AutomatedLabDefinition/AutomatedLabDefinition.psm1
Expand Up @@ -1115,7 +1115,7 @@ function Export-LabDefinition

if (Get-LabMachineDefinition | Where-Object HostType -eq HyperV)
{
$hypervMachines = Get-LabMachineDefinition | Where-Object HostType -eq HyperV
$hypervMachines = Get-LabMachineDefinition | Where-Object { $_.HostType -eq 'HyperV' -and -not $_.SkipDeployment }
$hypervUsedOperatingSystems = Get-LabAvailableOperatingSystem -NoDisplay | Where-Object OperatingSystemImageName -in $hypervMachines.OperatingSystem.OperatingSystemName

$spaceNeededBaseDisks = ($hypervUsedOperatingSystems | Measure-Object -Property Size -Sum).Sum
Expand Down Expand Up @@ -3741,4 +3741,4 @@ function Get-OnlineAdapterHardwareAddress
}
#endregion Internal

if (-not (Test-Path "alias:Get-LabPostInstallationActivity")) { New-Alias -Name Get-LabPostInstallationActivity -Value Get-LabInstallationActivity -Description "Alias so that scripts keep working" }
if (-not (Test-Path "alias:Get-LabPostInstallationActivity")) { New-Alias -Name Get-LabPostInstallationActivity -Value Get-LabInstallationActivity -Description "Alias so that scripts keep working" }

0 comments on commit 5d6842b

Please sign in to comment.