Ajout de la partie application des changements sur le disque
Ajout de l'installation de Windows Correction du chargement des images iso. Correction de la définition de la taille de WinRE.
This commit is contained in:
1 parent
1c67cb2630
commit
8d5014b4aa
13 files changed
+2524
-1445
No files matched your search
@@ -56,6 +56,12 @@ function Import-DeployCenterPartitionProfile {
|
||||
if ([int]$partition.Size.FreeSpaceMB -lt 250) { throw "La marge libre WinRE du profil '$ProfileName' doit être d'au moins 250 Mo." }
|
||||
if ([int]$partition.Size.PreviewMB -le 0) { throw "Le profil '$ProfileName' doit définir une réserve PreviewMB pour estimer la capacité disponible." }
|
||||
}
|
||||
'ConfiguredMB' {
|
||||
if ([string]::IsNullOrWhiteSpace([string]$partition.Size.ConfigKey) -or
|
||||
[int]$partition.Size.Value -lt 990 -or [int]$partition.Size.PreviewMB -lt 990) {
|
||||
throw "La taille configurée de la partition '$($partition.Name)' du profil '$ProfileName' doit définir ConfigKey et une valeur d’au moins 990 Mo."
|
||||
}
|
||||
}
|
||||
'UserInputGB' {
|
||||
if ([int]$partition.Size.MinimumGB -le 0 -or [int]$partition.Size.DefaultPercent -le 0 -or [int]$partition.Size.DefaultPercent -ge 100) {
|
||||
throw "La saisie de taille utilisateur du profil '$ProfileName' doit définir MinimumGB et un DefaultPercent entre 1 et 99."
|
||||
@@ -85,7 +91,7 @@ function Get-DeployCenterPartitionSizingCapacity {
|
||||
$reservedMB = 0.0
|
||||
foreach ($partition in $Profile.Partitions) {
|
||||
switch ([string]$partition.Size.Policy) {
|
||||
'FixedMB' { $reservedMB += [double]$partition.Size.Value }
|
||||
{ $_ -in @('FixedMB','ConfiguredMB') } { $reservedMB += [double]$partition.Size.Value }
|
||||
default {
|
||||
if ($partition.Size.ContainsKey('PreviewMB')) { $reservedMB += [double]$partition.Size.PreviewMB }
|
||||
}
|
||||
@@ -101,4 +107,21 @@ function Get-DeployCenterPartitionSizingCapacity {
|
||||
}
|
||||
}
|
||||
|
||||
Export-ModuleMember -Function Get-DeployCenterPartitionProfileNames, Import-DeployCenterPartitionProfile, Get-DeployCenterPartitionSizingCapacity
|
||||
function New-DeployCenterPartitionSizingState {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory=$true)][System.Collections.IDictionary]$Profile,
|
||||
[Parameter(Mandatory=$true)]$DiskInfo,
|
||||
[Parameter(Mandatory=$true)][System.Collections.IDictionary]$Selection
|
||||
)
|
||||
return [pscustomobject]@{
|
||||
ProfileId = [string]$Profile.Id
|
||||
DiskIndex = [int]$DiskInfo.Index
|
||||
Inputs = $Selection.Inputs
|
||||
RemainderRole = [string]$Selection.RemainderRole
|
||||
RemainderGB = [double]$Selection.RemainderGB
|
||||
AvailableGB = [double]$Selection.AvailableGB
|
||||
}
|
||||
}
|
||||
|
||||
Export-ModuleMember -Function Get-DeployCenterPartitionProfileNames, Import-DeployCenterPartitionProfile, Get-DeployCenterPartitionSizingCapacity, New-DeployCenterPartitionSizingState
|
||||
Reference in new issue
Block a user