Conversation
There was a problem hiding this comment.
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.2and 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 $exitcodewill terminate the caller’s PowerShell session, and$exitcodeis never set in this function. Usereturn(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" | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Public/OSDCloudIPUPublic/OSDCloud/OSDCloudIPU.ps126.8.5.2and update changelogValidation