diff --git a/FFUDevelopment/Apps/Orchestration/Invoke-AppsScript.ps1 b/FFUDevelopment/Apps/Orchestration/Invoke-AppsScript.ps1 index 669a77e..16e6054 100644 --- a/FFUDevelopment/Apps/Orchestration/Invoke-AppsScript.ps1 +++ b/FFUDevelopment/Apps/Orchestration/Invoke-AppsScript.ps1 @@ -38,6 +38,8 @@ else { # Example of how to use the AppsScriptVariables hashtable to control script execution +# Note: The UI saves the values as strings, so if you type true for a value, it'll save to the config file as a string, not boolean + # Example: Check if a variable named 'foo' is set to string 'bar' and run a script accordingly # if ($AppsScriptVariables['foo'] -eq 'bar') { # Write-Host "Foo would have installed" @@ -46,8 +48,8 @@ else { # Write-Host "Foo would not have installed" # } -# Example: Check if a variable named 'foo' is set to boolean $true and run a script accordingly -# if ($AppsScriptVariables[Teams] -eq $true) { +# Example: Check if a variable named 'Teams' is set to string 'true' and run a script accordingly +# if ($AppsScriptVariables['Teams'] -eq 'true') { # Write-Host "Teams would have been installed" # } # else { @@ -55,5 +57,4 @@ else { # } # Your code below here - Write-Host 'Invoke-AppsScript.ps1 finished' \ No newline at end of file diff --git a/FFUDevelopment/BuildFFUVM.ps1 b/FFUDevelopment/BuildFFUVM.ps1 index 0ce5c66..b37c639 100644 --- a/FFUDevelopment/BuildFFUVM.ps1 +++ b/FFUDevelopment/BuildFFUVM.ps1 @@ -3501,7 +3501,13 @@ function Get-FFUEnvironment { Remove-Item -Path $KBPath -Recurse -Force -ErrorAction SilentlyContinue WriteLog 'Removal complete' } - Writelog 'Removing dirty.txt file' + # Remove existing Apps.iso + if (Test-Path -Path $AppsISO) { + WriteLog "Removing $AppsISO" + Remove-Item -Path $AppsISO -Force -ErrorAction SilentlyContinue + WriteLog 'Removal complete' + } + WriteLog 'Removing dirty.txt file' Remove-Item -Path "$FFUDevelopmentPath\dirty.txt" -Force WriteLog "Cleanup complete" }