mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-15 18:49:34 -06:00
- Added Apps\Orchestration folder with new orchestration workflow to replace InstallAppsAndSysprep.cmd file.
- Updated BuildFFUUnattend files to point to the new Orchestrator.ps1 file. - Added new common and FFUUI.Core directories that house common/shared files between the UI and PS1 script. This breaks up each of the PS1 scripts to keep things smaller and more organized. Still a lot of work to do here to pull some stuff out of the PS1 scripts. - Modified the CaptureFFU.ps1 file to include more info during the capture process to help with troubleshooting - Too many functional changes to list here.
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Orchestration script for FFU VM deployment tasks
|
||||
|
||||
.DESCRIPTION
|
||||
This script orchestrates the following deployment tasks:
|
||||
- Install-Office.ps1
|
||||
- Update-Defender.ps1
|
||||
- Update-MSRT.ps1
|
||||
- Update-OneDrive.ps1
|
||||
- Update-Edge.ps1
|
||||
- Install-Win32Apps.ps1
|
||||
- Invoke-AppsScript.ps1
|
||||
- Install-UserApps.ps1
|
||||
- Install-StoreApps.ps1
|
||||
- Run-DiskCleanup.ps1
|
||||
- Run-Sysprep.ps1
|
||||
|
||||
The script will check for the presence of each of these files and if they exist, will run the script
|
||||
#>
|
||||
|
||||
# Header
|
||||
|
||||
Write-Host "---------------------------------------------------" -ForegroundColor Yellow
|
||||
Write-Host " FFU Builder Orchestrator " -ForegroundColor Yellow
|
||||
Write-Host "---------------------------------------------------" -ForegroundColor Yellow
|
||||
|
||||
# Define the path to the scripts
|
||||
$scriptPath = Split-Path -Parent $MyInvocation.MyCommand.Definition
|
||||
|
||||
# Define the list of scripts to run, order doesn't matter - if you have a custom script, add it here
|
||||
$scriptList = @(
|
||||
"Install-Office.ps1",
|
||||
"Update-Defender.ps1",
|
||||
"Update-MSRT.ps1",
|
||||
"Update-OneDrive.ps1",
|
||||
"Update-Edge.ps1",
|
||||
"Install-Win32Apps.ps1",
|
||||
"Install-StoreApps.ps1",
|
||||
"Invoke-AppsScript.ps1",
|
||||
"Install-UserApps.ps1"
|
||||
)
|
||||
# Check if each script exists and run it if it does
|
||||
foreach ($script in $scriptList) {
|
||||
$scriptFile = Join-Path -Path $scriptPath -ChildPath $script
|
||||
if (Test-Path -Path $scriptFile) {
|
||||
Write-Host "`n" # Add a newline for spacing
|
||||
Write-Host "---------------------------------------------------" -ForegroundColor Yellow
|
||||
Write-Host " Running script: $script" -ForegroundColor Yellow
|
||||
Write-Host "---------------------------------------------------" -ForegroundColor Yellow
|
||||
# Run script and wait for it to finish
|
||||
# pause
|
||||
& $scriptFile
|
||||
}
|
||||
}
|
||||
|
||||
# Run-DiskCleanup.ps1 must run before Run-Sysprep.ps1
|
||||
$diskCleanupScript = Join-Path -Path $scriptPath -ChildPath "Run-DiskCleanup.ps1"
|
||||
if (Test-Path -Path $diskCleanupScript) {
|
||||
Write-Host "`n" # Add a newline for spacing
|
||||
Write-Host "---------------------------------------------------" -ForegroundColor Yellow
|
||||
Write-Host " Running script: Run-DiskCleanup.ps1" -ForegroundColor Yellow
|
||||
Write-Host "---------------------------------------------------" -ForegroundColor Yellow
|
||||
# Run script and wait for it to finish
|
||||
& $diskCleanupScript
|
||||
|
||||
} else {
|
||||
Write-Host "Run-DiskCleanup.ps1 not found!"
|
||||
}
|
||||
|
||||
# Run-Sysprep.ps1 must run last
|
||||
$sysprepScript = Join-Path -Path $scriptPath -ChildPath "Run-Sysprep.ps1"
|
||||
if (Test-Path -Path $sysprepScript) {
|
||||
Write-Host "`n" # Add a newline for spacing
|
||||
Write-Host "---------------------------------------------------" -ForegroundColor Yellow
|
||||
Write-Host " Running script: Run-Sysprep.ps1" -ForegroundColor Yellow
|
||||
Write-Host "---------------------------------------------------" -ForegroundColor Yellow
|
||||
# Run script and wait for it to finish
|
||||
& $sysprepScript
|
||||
} else {
|
||||
Write-Host "Run-Sysprep.ps1 not found!"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user