From 64a726d234c5e63a13e22158c54b45a9b994771c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 6 Oct 2026 13:02:13 +0000 Subject: [PATCH 1/2] Initial plan From dd5e638b9e3eca90e61817777c5537464e1d0631 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 6 Oct 2026 13:03:57 +0000 Subject: [PATCH 2/2] fix(deployment): stop on setup script failures Co-authored-by: OSDeploy <12970006+OSDeploy@users.noreply.github.com> --- .../steps/4-install/step-install-expandwindowsimage.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OSDCloud/private/steps/4-install/step-install-expandwindowsimage.ps1 b/OSDCloud/private/steps/4-install/step-install-expandwindowsimage.ps1 index d830cb8..05d155e 100644 --- a/OSDCloud/private/steps/4-install/step-install-expandwindowsimage.ps1 +++ b/OSDCloud/private/steps/4-install/step-install-expandwindowsimage.ps1 @@ -52,16 +52,16 @@ function step-install-expandwindowsimage { try { Write-Verbose -Message "[$(Get-Date -format s)] [$($MyInvocation.MyCommand.Name)] Running Expand-WindowsImage with parameters: $($Params | Out-String)" Expand-WindowsImage @Params | Out-Null - New-Item -Path 'C:\Windows\Setup\Scripts' -ItemType Directory -Force | Out-Null + New-Item -Path 'C:\Windows\Setup\Scripts' -ItemType Directory -Force -ErrorAction Stop | Out-Null # Create SetupComplete.cmd if it does not exist $setupCompletePath = 'C:\Windows\Setup\Scripts\SetupComplete.cmd' if (-not (Test-Path $setupCompletePath)) { - New-Item -Path $setupCompletePath -ItemType File -Force | Out-Null + New-Item -Path $setupCompletePath -ItemType File -Force -ErrorAction Stop | Out-Null } # Create SetupComplete.cmd - ":: RecastOSDCloud $(Get-Date -format s)" | Out-File -FilePath $setupCompletePath -Append -Encoding ascii -Width 2000 -Force + ":: RecastOSDCloud $(Get-Date -format s)" | Out-File -FilePath $setupCompletePath -Append -Encoding ascii -Width 2000 -Force -ErrorAction Stop # Create OOBE.cmd - ":: RecastOSDCloud $(Get-Date -format s)" | Out-File -FilePath 'C:\Windows\Setup\Scripts\OOBE.cmd' -Append -Encoding ascii -Width 2000 -Force + ":: RecastOSDCloud $(Get-Date -format s)" | Out-File -FilePath 'C:\Windows\Setup\Scripts\OOBE.cmd' -Append -Encoding ascii -Width 2000 -Force -ErrorAction Stop } catch { Write-Warning "[$(Get-Date -format s)] Expand-WindowsImage failed."