Skip to content

Refactor OSDCloud IPU scripts into dedicated files - #382

Merged
OSDeploy merged 1 commit into
masterfrom
spider
Aug 5, 2026
Merged

Refactor OSDCloud IPU scripts into dedicated files#382
OSDeploy merged 1 commit into
masterfrom
spider

Conversation

@OSDeploy

@OSDeploy OSDeploy commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • split OSDCloud IPU functionality from monolithic script into dedicated command files under Public/OSDCloudIPU
  • remove legacy Public/OSDCloud/OSDCloudIPU.ps1
  • bump module version to 26.8.5.2 and update changelog

Validation

  • module manifest and changelog updated
  • branch rebased from current master before PR creation

Copilot AI lite review requested due to automatic review settings August 5, 2026 20:49
@OSDeploy
OSDeploy merged commit 01d0393 into master Aug 5, 2026
@OSDeploy
OSDeploy deleted the spider branch August 5, 2026 20:50
@OSDeploy OSDeploy self-assigned this Aug 5, 2026
@OSDeploy OSDeploy added the bug Something isn't working label Aug 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the OSDCloud in-place upgrade (IPU) implementation by splitting the previously monolithic Public/OSDCloud/OSDCloudIPU.ps1 into dedicated public function scripts under Public/OSDCloudIPU, and updates the module version/changelog accordingly.

Changes:

  • Split IPU-related functions into separate public scripts under Public/OSDCloudIPU.
  • Removed the legacy monolithic Public/OSDCloud/OSDCloudIPU.ps1.
  • Bumped module version to 26.8.5.2 and added changelog entry.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 20 comments.

Show a summary per file
File Description
Public/OSDCloudIPU/Invoke-OSDCloudIPU.ps1 New dedicated entry point for the IPU workflow (device inspection, media acquisition, setup launch).
Public/OSDCloudIPU/New-OSDCloudOSWimFile.ps1 New dedicated helper to build setup media from Feature Update ESD (optionally ISO).
Public/OSDCloudIPU/Set-Win11ReqBypassRegValues.ps1 New dedicated helper to set Windows 11 requirement-bypass registry values.
Public/OSDCloudIPU/Invoke-IPUPreInstallNotification.ps1 New dedicated pre-install toast notification workflow.
Public/OSDCloudIPU/Invoke-IPUPreInstallNotificationLauncher.ps1 New dedicated launcher to run notifications in the logged-on user context.
Public/OSDCloud/OSDCloudIPU.ps1 Removed legacy monolithic script after migration to dedicated files.
OSD.psd1 Module version bump to 26.8.5.2.
CHANGELOG.md Added release notes for 26.8.5.2 describing the IPU refactor.
Suppressed comments (1)

Public/OSDCloudIPU/Invoke-IPUPreInstallNotification.ps1:217

  • exit $exitcode will terminate the caller’s PowerShell session, and $exitcode is never set in this function. Use return (and stop the transcript) instead.
$TimeStamp = Get-Date -f s
New-ItemProperty -Path $registryPath -Name $keynameFinish -Value $TimeStamp -Force
CMTraceLog -Message  "Finished $ScriptName" -Type 1 -LogFile $LogFile
exit $exitcode

}
else {
Write-Warning "[-] Running as $whoiam and is NOT Admin Elevated"
Break
Comment on lines +2 to +5
<#
Log Files for IPU: https://learn.microsoft.com/en-us/windows/deployment/upgrade/log-files
Setup Command Line: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-command-line-options?view=windows-11
#>
}
else {
Write-Warning "[-] Running as $whoiam and is NOT Admin Elevated"
Break
Comment on lines +2 to +5
<#
Log Files for IPU: https://learn.microsoft.com/en-us/windows/deployment/upgrade/log-files
Setup Command Line: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-command-line-options?view=windows-11
#>
Comment on lines +116 to +117
$ImageFileItem = Find-OSDCloudFile -Name $OSDCloudOperatingSystem.FileName -Path '\OSDCloud\OS\' | Sort-Object FullName | Where-Object {$_.Length -gt 3GB}
$ImageFileItem = $ImageFileItem | Where-Object {$_.FullName -notlike "C*"} | Where-Object {$_.FullName -notlike "X*"} | Select-Object -First 1
Comment on lines +141 to +145
CMTraceLog -Message "Waited $Minutes Minutes, exiting script with Exit 20, I'm tired of waiting" -Type 3 -LogFile $LogFile
$TimeStamp = Get-Date -f s
New-ItemProperty -Path $registryPath -Name $keynameFinish -Value $TimeStamp -Force
exit 20
}
$Toast.Group = $ToastGroup

$dict = New-Object 'System.Collections.Generic.Dictionary[[string],[string]]'
$dict.Add("progressValue","$SetupProgressNumber")
Comment on lines +424 to +425
CMTraceLog -Message "Finished $ScriptName" -Type 1 -LogFile $LogFile
exit $exitcode
Comment on lines +3 to +24
<#
.SYNOPSIS
--.
.DESCRIPTION
Create a Process as Logged-On-User from PowerShell
Then Launch the PreInstall Notificaiton Script as the logged on user.

.INPUTS
None.
.OUTPUTS
None.
.NOTES
Created by @gwblok
.LINK
https://garytown.com
.LINK
https://www.recastsoftware.com
.COMPONENT
--
.FUNCTIONALITY
--
#>
Comment on lines +58 to +63
# Load some required namespaces
$null = [Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime]
$null = [Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime]
$Null = [System.Security.AccessControl.FileSystemAccessRule]
Add-Type -Path "$PSScriptRoot\Microsoft.Toolkit.Uwp.Notifications.dll"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants