Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Public/Initialize-OSDBuilder.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ function Initialize-OSDBuilder {
#New-PEBuild
NewPEBuildCreateISO = $false
NewPEBuildExecute = $false
NewPEBuildSkipGrid = $false
NewPEBuildTaskName = $null
NewPEBuildPauseDismount = $false
NewPEBuildPauseMount = $false
#New-PEBuildTask
Expand Down Expand Up @@ -265,4 +267,4 @@ function Initialize-OSDBuilder {
Write-Warning "$SetOSDBuilderPathContent\Mount has been moved to $SetOSDBuilderPathMount"
Write-Warning "Verify that you don't have any active mounted images and remove this directory"
}
}
}
21 changes: 19 additions & 2 deletions Public/New-PEBuild.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ function New-PEBuild {

#Executes the PEBuild
[switch]$Execute = $global:SetOSDBuilder.NewPEBuildExecute,

#PEBuild Tasks to process
[string[]]$TaskName = $global:SetOSDBuilder.NewPEBuildTaskName,

#Used to bypass the ISE GridView PE Task Selection
#Must use TaskName Parameter
#Alias: SkipGridView
[Alias('SkipGridView')]
[switch]$SkipGrid = $global:SetOSDBuilder.NewPEBuildSkipGrid,

#Adds a 'Press Enter to Continue' prompt before WinPE is dismounted
[Parameter(ParameterSetName='Advanced')]
Expand Down Expand Up @@ -113,7 +122,15 @@ $MDTUnattendPEx86 = @'
#$GetPEBuildTask = Get-ChildItem -Path $SetOSDBuilderPathTasks *.json -File | Select-Object -Property BaseName, FullName, Length, CreationTime, LastWriteTime | Sort-Object -Property BaseName
#$GetPEBuildTask = $GetPEBuildTask | Where-Object {$_.BaseName -like "MDT*" -or $_.BaseName -like "Recovery*" -or $_.BaseName -like "WinPE*"}
#$GetPEBuildTask = $GetPEBuildTask | Out-GridView -Title "OSDBuilder Tasks: Select one or more Tasks to execute and press OK (Cancel to Exit)" -Passthru
$GetPEBuildTask = Get-PEBuildTask | Out-GridView -PassThru -Title "PEBuild Tasks: Select one or more Tasks to execute and press OK (Cancel to Exit)"
$GetPEBuildTask = Get-PEBuildTask

if($TaskName) {
$GetPEBuildTask = $GetPEBuildTask | Where-Object {$_.TaskName -in $TaskName}
}

if(!($SkipGrid.IsPresent)) {
$GetPEBuildTask = $GetPEBuildTask | Out-GridView -PassThru -Title "PEBuild Tasks: Select one or more Tasks to execute and press OK (Cancel to Exit)"
}

if($null -eq $GetPEBuildTask) {
Write-Warning "PEBuild Task was not selected or found . . . Exiting!"
Expand Down Expand Up @@ -845,4 +862,4 @@ $MDTUnattendPEx86 = @'
#Write-Host '========================================================================================' -ForegroundColor DarkGray
#Write-Host -ForegroundColor Green "$($MyInvocation.MyCommand.Name) END"
}
}
}