This repository demonstrates a workflow to in-place upgrade a computer running Windows 10 to Windows 11, while executing as SYSTEM. Used with PDQ Connect but potentially applicable to other management / RMM tools.
- spacecheck.ps1: Checks for 35GB of available space.
- File Transfer: Copy the Windows 11 ISO to a Temp folder.
- W11_upgrade.ps1: Runs the update as SYSTEM.
spacecheck.ps1
- Identifies the boot (primary) drive.
- Calculates Free, used and Total space in GB.
- Outputs this information to a table with Write-Output.
- Defines an adjustable minimum space requirement (we use 35GB).
- Throws an error if the minimum space requirement isn't met.
File Transfer
For this, we simply use PDQ Connects 'File copy step' to download the Windows 11 ISO (Windows.iso) to C:\Temp
W11_upgrade.ps1
- Defines path to where the ISO was copied.
- Verifies the ISO was successfully copied.
- Mounts the ISO and retreives a drive letter.
- Defines a path to setup.exe with the ISO mounted.
- Verifies the path exists.
- Defines parameters for setup.exe (can be customized). We have it set to not automatically reboot.
- Starts the W11 upgrade process.
- Monitors the W11 upgrade process every 60 seconds, specifically looking for the 'setup', 'SetupHost', and 'SetupPrep' processes to be completed.
- After all three of those processes have finished, it unmounts the ISO and deletes the ISO file.
- Initiates a delayed reboot (5 minute countdown) of the system with a full-screen message saying: "The Windows 11 installation process is now complete. This system will reboot in five minutes to finish the upgrade. Please save your work."
- Confirmation script completed successfully with date/time.