Skip to main content

Invoke-Windows11InstallerWithPrompt

Overview​

Upgrade Windows 10 and older Windows 11 devices to Windows 11 24H2 (build 26100) without surprise restarts. The script asks users to postpone or schedule the upgrade, upgrades the device, and confirms the result after the restart.

Designed for RMM platforms, it needs a single deployment. Self-managing Windows Scheduled Tasks handle every prompt, the upgrade, and the check after the restart. Prompts appear in English or Dutch, based on the user's display language.

Devices that cannot run Windows 11 are never prompted. Hardware compatibility, disk space, and BitLocker are checked before the first prompt. See Compatibility and Safety Checks.

By default, the script installs the Windows 11 24H2 image hosted by ProVal. Need a device upgraded right away? -WithoutPrompt skips every prompt. See Upgrade Without Prompting.

Every prompt title and message can be replaced with your own wording, and prompts can carry your own icon and header image. See Customize the Prompt Text.

Requirements​

RequirementDetails
Operating SystemWindows 10, or Windows 11 earlier than 24H2. Workstation editions only
HardwareMeets the Windows 11 hardware requirements (TPM 2.0, supported processor, Secure Boot capable)
Free Disk Space24 GB on the system drive (configurable)
PowerShellVersion 5.1 or later
Execution ContextAdministrator / SYSTEM (via RMM)
Internet AccessRequired to download the prompt interface, the upgrade tool, and the Windows 11 image

Note: All dependencies, including the prompt engine and the upgrade tool, are automatically downloaded on the first run.

Dependencies​

Before You Deploy​

How it runs​

  • Single Deployment: Run this script once per device via your RMM. Scheduled tasks handle all later prompts, the upgrade, and the check after the restart.
  • Script Location: The script copies itself to a Scheduled subfolder and its tasks run that copy. You can redeploy or replace the original at any time without affecting a cycle in progress.
  • RMM Timeout: The first prompt appears during the RMM job. Allow at least 30 minutes (45 minutes with -MaxPostpone 0). The upgrade itself always runs from a scheduled task, so it never hits the RMM timeout.
  • Restarts: The upgrade takes an hour or more and restarts the device, sometimes more than once.
  • Restarting the Cycle: Use -Force to remove existing tasks and start the prompt cycle from zero. It is refused while an upgrade is running.
  • Offline Devices: Without internet access, the script quietly tries again at the next interval.

Who gets prompted, and when​

  • Compatibility First: Devices that fail the hardware, disk space, or BitLocker checks are never prompted. Devices already on 24H2 or later are left unchanged.
  • User Presence: Prompts only show when a user is logged in and unlocked. Use -IfNotLoggedIn to upgrade unattended devices, or -MaxMissedPromptsBeforeForce to upgrade devices that stay locked too long.
  • Business Hours: Pair -SkipWeekends with -SuppressPopupTimeWindows '1800-0900' to hide prompts during nights and weekends.
  • Chosen Times Are Kept: A time the user picks is honoured, even if the screen is locked or the time is outside your prompt hours.
  • No Surprise Upgrades: If the device is off at the chosen time, the upgrade does not start later by surprise. The user is asked to pick a new time instead. See If the Device Was Off at the Chosen Time.

Protecting the device​

  • BitLocker: Handled automatically. Protection is suspended for the upgrade and turned back on afterwards, so users never see a recovery screen.
  • Laptops: The upgrade never starts on battery. It waits and tries again, and the built-in prompts ask the user to connect to power.
  • Custom Images: -Uri installs your own Windows 11 ISO or ZIP file instead of the ProVal image. ProVal is not responsible for any issue caused by a custom ISO or ZIP file.
  • Prompt Hiccups: A prompt that fails to display is retried automatically and never counts against the user's postponements.

Deployment Examples​

Standard deployment (5 postponements, 4-hour intervals):

.\Invoke-Windows11InstallerWithPrompt.ps1

Respect business hours and weekends:

.\Invoke-Windows11InstallerWithPrompt.ps1 -MaxPostpone 3 -IntervalMinutes 120 -SkipWeekends -SuppressPopupTimeWindows '1800-0900'

Upgrade unattended and locked devices:

.\Invoke-Windows11InstallerWithPrompt.ps1 -IfNotLoggedIn -MaxMissedPromptsBeforeForce 3 -UpgradeDuringSuppress

Ask only once for a new time after a missed upgrade:

.\Invoke-Windows11InstallerWithPrompt.ps1 -MaxMissedScheduledUpgrades 1

Reset a stuck prompt cycle:

.\Invoke-Windows11InstallerWithPrompt.ps1 -Force

Upgrade immediately without any prompts:

.\Invoke-Windows11InstallerWithPrompt.ps1 -WithoutPrompt

Keep the user informed while the upgrade runs:

.\Invoke-Windows11InstallerWithPrompt.ps1 -ShowProgressPrompt -ProgressPromptInterval 10 -ProgressPromptTimeout 300

Keep a notification on screen for the whole upgrade:

.\Invoke-Windows11InstallerWithPrompt.ps1 -KeepProgressPromptVisible

Require more free space and allow one battery retry:

.\Invoke-Windows11InstallerWithPrompt.ps1 -MinimumFreeSpaceGB 40 -MaxACPowerRetries 1

Use your own wording and a light prompt window:

.\Invoke-Windows11InstallerWithPrompt.ps1 -Title 'Windows upgrade' -RegularPromptMessage 'IT will upgrade ComputerName to Windows 11 24H2. You have PromptsLeft reminder(s) left.\n\nSave your work and click Upgrade Now.' -Theme Light

Use your own branding:

.\Invoke-Windows11InstallerWithPrompt.ps1 -Icon 'https://example.com/icon.png' -HeaderImage '\\fileserver\share\header.png'

Install your own Windows 11 image (ProVal is not responsible for custom images):

.\Invoke-Windows11InstallerWithPrompt.ps1 -Uri 'https://files.example.com/win11/Win11_24H2_English_x64.iso'

Prompt Cycle Walkthrough​

Standard Cycle (English)​

  1. Prompts 1 to 5: The user sees a notice and clicks Postpone. The script checks back in 4 hours.
  2. Final Prompt: The user picks a time within the next 48 hours. If ignored for 15 minutes, the upgrade starts 10 minutes later.
  3. Reminder: 10 minutes before the chosen time, a "Starting Soon" warning appears.
  4. Upgrade: Power, disk space, and BitLocker are checked again. Windows 11 then downloads, installs, and restarts the device.
  5. Check After Restart: About 5 minutes after the device starts, the script confirms Windows 11 24H2 and turns BitLocker protection back on.
  6. Completion: The user sees a confirmation. If nobody is signed in, it appears at the next sign-in.

If the Device Was Off at the Chosen Time​

Example: the user picks 8:00 PM, shuts the laptop down at 6:00 PM, and turns it on the next day at 10:00 AM.

  1. The upgrade does not start. An upgrade never starts more than 30 minutes late.
  2. About a minute later, the user is asked to pick a new time.
  3. If the user ignores that prompt, no upgrade starts. The prompt returns after IntervalMinutes.
  4. After MaxMissedScheduledUpgrades (default 3) missed or unanswered times, the cycle ends as a failure. Nothing changes on the device.

The same applies when a user clicks Upgrade Now and closes the lid before the upgrade begins.

While the Upgrade Runs​

The upgrade runs in the background for an hour or more. Two optional modes keep the user informed; both are off by default:

  • Interval mode (-ShowProgressPrompt): every ProgressPromptInterval minutes a notice appears for ProgressPromptTimeout seconds, then closes itself.
  • Stay mode (-KeepProgressPromptVisible): the notice appears when the upgrade starts and stays on screen. Clicking OK only hides it until the next check brings it back.

Stay mode wins when both are set. The notice only appears while a user is logged in and unlocked. The restart closes it.

Automatic Localization​

If the user's Windows display language is Dutch (nl-NL or nl-BE), all prompts and buttons are shown in Dutch (Uitstellen, Nu upgraden, Upgrade plannen). No extra parameters are needed.

Suppression & Unattended​

If -SkipWeekends and -SuppressPopupTimeWindows '1800-0900' are used:

  • Prompts are hidden on weekends and between 6 PM and 9 AM.
  • With -IfNotLoggedIn, devices with nobody logged in are upgraded during allowed hours.
  • With -UpgradeDuringSuppress, unattended and forced upgrades may also run during those hidden hours.

Upgrade Without Prompting​

With -WithoutPrompt, the prompt cycle is skipped:

  1. Any cycle already running is cancelled. -Force is not needed. It is refused while an upgrade is running.
  2. The compatibility and safety checks still run.
  3. The upgrade starts from a scheduled task one minute later, and the RMM job ends straight away.
  4. No prompt of any kind is shown, including the in-progress and completion prompts.
  5. On battery, the upgrade waits and retries silently.

-WithoutPrompt overrides every prompt, suppression, and scheduling parameter. Only -Uri, -MinimumFreeSpaceGB, -MinimumReservedPartitionFreeMB, -SkipBitLockerSafetyCheck, and -MaxACPowerRetries still apply.

Note: Setting -MaxPostpone 0 is not the same thing. It still shows the final scheduling prompt.

Compatibility and Safety Checks​

These checks run before the first prompt. All but the hardware check run again at the upgrade time.

CheckRequirementIf it fails
Windows versionWindows 10, or Windows 11 earlier than 24H2Already on 24H2 or later: nothing changes, reported as success
HardwareWindows 11 requirements, checked with Microsoft's Hardware Readiness scriptNot compatible: no prompt, reported as failure
Free disk spaceMinimumFreeSpaceGB (24 GB) on the system driveNo prompt, reported as failure
System reserved partitionMinimumReservedPartitionFreeMB (15 MB) free. Freed automatically on GPT disksNo prompt, reported as failure
BitLockerTPM ready, plus a TPM and a recovery password protectorNo prompt, reported as failure (unless -SkipBitLockerSafetyCheck)
Power (upgrade time only)Laptops on AC powerWaits IntervalMinutes and retries, up to MaxACPowerRetries times

Note: If Microsoft's check cannot confirm compatibility, the script continues. Windows Setup checks again during the upgrade and stops it if the device is not compatible.

Your BitLocker recovery key is never read or logged.

Customize the Prompt Text​

Leave the text parameters empty and users see the built-in wording in their own language. Set one and your wording is used instead, exactly as written.

ParameterReplaces
TitleTitle on the regular, final, and missed upgrade prompts
RegularPromptMessageBody of the postponable prompts
FinalPromptMessageBody of the final scheduling prompt
MissedUpgradePromptMessageBody of the prompt that asks for a new time after a missed upgrade
ReminderPromptTitle / ReminderPromptMessageThe 10-minute warning
CompletionPromptTitle / CompletionPromptMessageThe confirmation after the upgrade
ProgressPromptTitle / ProgressPromptMessageThe notice shown while the upgrade runs

Default messages​

These are the messages users see when the text parameters are left empty. Wording follows the display language of the logged-in user.

Names such as PromptsLeft and ScheduledUpgradeTime are replaced with live values before the prompt appears. \n produces a line break.

Titles​

ParameterEnglishDutch
TitleWindows 11 UpgradeWindows 11-upgrade
ReminderPromptTitleWindows 11 Upgrade - Starting SoonWindows 11-upgrade - Start binnenkort
CompletionPromptTitleWindows 11 Upgrade - CompleteWindows 11-upgrade - Voltooid
ProgressPromptTitleWindows 11 Upgrade - In ProgressWindows 11-upgrade - Bezig

Messages​

Regular prompt — RegularPromptMessage

English

An upgrade to Windows 11 24H2 is available for your computer. The upgrade can take an hour or more and restarts your computer, so please save your work first. You will receive PromptsLeft more prompt(s) with an interval of PromptIntervalMinutes minutes. After the last prompt the upgrade will proceed automatically.\n\nPlease save your work and click Upgrade Now to proceed.

Dutch

Er is een upgrade naar Windows 11 24H2 beschikbaar voor uw computer. De upgrade kan een uur of langer duren en start uw computer opnieuw op, dus sla eerst uw werk op. U ontvangt nog PromptsLeft herinnering(en) met een interval van PromptIntervalMinutes minuten. Na de laatste herinnering wordt de upgrade automatisch uitgevoerd.\n\nSla uw werk op en klik op Nu upgraden om door te gaan.

Final prompt — FinalPromptMessage

English

An upgrade to Windows 11 24H2 is required on your computer. This is the final prompt. Please select a time within the next 48 hours for the upgrade to begin. If no action is taken within FinalTimeoutMinutes minutes the upgrade will proceed automatically in DelayAfterFinalMinutes minutes.\n\nChoose a time and click Schedule Upgrade.

Dutch

Er is een upgrade naar Windows 11 24H2 vereist op uw computer. Dit is de laatste herinnering. Selecteer een tijdstip binnen de komende 48 uur voor de upgrade. Als er geen actie wordt ondernomen binnen FinalTimeoutMinutes minuten, wordt de upgrade automatisch uitgevoerd na DelayAfterFinalMinutes minuten.\n\nKies een tijdstip en klik op Upgrade plannen.

Missed upgrade prompt — MissedUpgradePromptMessage

English

Your Windows 11 upgrade was planned for MissedUpgradeTime, but it could not start because your computer was turned off or not connected at that time. Please select a new time within the next 48 hours for the upgrade to begin. If no time is selected, you will be asked again in PromptIntervalMinutes minutes.\n\nChoose a time and click Schedule Upgrade.

Dutch

Uw Windows 11-upgrade stond gepland voor MissedUpgradeTime, maar kon niet starten omdat uw computer op dat moment uit stond of niet verbonden was. Selecteer een nieuw tijdstip binnen de komende 48 uur voor de upgrade. Als er geen tijdstip wordt gekozen, wordt het u over PromptIntervalMinutes minuten opnieuw gevraagd.\n\nKies een tijdstip en klik op Upgrade plannen.

Reminder prompt — ReminderPromptMessage

English

Your Windows 11 upgrade is scheduled to begin at ScheduledUpgradeTime.\n\nPlease save all your work now. The upgrade will start in MinutesUntilUpgrade minute(s).\n\nClick OK to acknowledge.

Dutch

Uw Windows 11-upgrade staat gepland om te beginnen om ScheduledUpgradeTime.\n\nSla al uw werk nu op. De upgrade begint over MinutesUntilUpgrade minuten.\n\nKlik op OK om te bevestigen.

Completion prompt — CompletionPromptMessage

English

Your computer has been upgraded to Windows 11 24H2 successfully.\n\nYour computer is ready to use.\n\nClick OK to acknowledge.

Dutch

Uw computer is succesvol bijgewerkt naar Windows 11 24H2.\n\nUw computer is klaar voor gebruik.\n\nKlik op OK om te bevestigen.

In-progress notice — ProgressPromptMessage

English

Windows 11 24H2 is being downloaded and installed on your computer. The upgrade is running in the background.\n\nYour computer will restart automatically, possibly more than once, so please save your work and leave the computer switched on.\n\nNo action is needed from you.

Dutch

De upgrade naar Windows 11 24H2 wordt op uw computer gedownload en uitgevoerd. De upgrade loopt op de achtergrond.\n\nUw computer wordt automatisch opnieuw opgestart, mogelijk meerdere keren. Sla uw werk op en laat de computer ingeschakeld.\n\nU hoeft verder niets te doen.

Extra line on laptops​

On laptops, notebooks, and tablets the following line is added before the closing sentence of these five prompts. Desktops do not see it.

PromptEnglishDutch
Regular promptPlease connect your laptop to power before the upgrade begins. The upgrade does not start while the laptop runs on battery.Sluit uw laptop aan op de netstroom voordat de upgrade begint. De upgrade start niet zolang de laptop op de accu werkt.
Final promptPlease make sure your laptop is connected to power at the time you select.Zorg ervoor dat uw laptop op het gekozen tijdstip op de netstroom is aangesloten.
Missed upgrade promptPlease make sure your laptop is connected to power at the time you select.Zorg ervoor dat uw laptop op het gekozen tijdstip op de netstroom is aangesloten.
Reminder promptPlease make sure your laptop is connected to power now.Zorg ervoor dat uw laptop nu op de netstroom is aangesloten.
In-progress noticePlease keep your laptop connected to power until the upgrade has finished.Laat uw laptop aangesloten op de netstroom totdat de upgrade is voltooid.

Insert live values​

Type any of these names into your message as a plain word. The script swaps in the real value before the prompt appears.

NameShows
PromptsToSendTotal prompts the user will receive
PromptsSentPrompts shown so far, including this one
PromptsLeftPrompts still to come after this one
PromptIntervalMinutes / PromptIntervalHoursTime between prompts
RegularTimeoutSeconds / RegularTimeoutMinutesRegular prompt timeout
FinalTimeoutSeconds / FinalTimeoutMinutesFinal prompt timeout
DelayAfterFinalSeconds / DelayAfterFinalMinutesGrace period after the final prompt
ScheduledUpgradeTimeTime the upgrade starts (reminder prompt only)
MinutesUntilUpgradeMinutes until the upgrade starts (reminder prompt only)
MissedUpgradeTimeTime the missed upgrade was planned for (missed upgrade prompt only)
ProgressIntervalMinutesMinutes between in-progress notices
ProgressTimeoutSeconds / ProgressTimeoutMinutesHow long each in-progress notice stays on screen
UpgradeElapsedMinutesMinutes the upgrade has been running (in-progress notice only)
ComputerNameMachine name
UserNameLogged-in username

Use \n for a line break. Minutes and hours are converted for you, so no manual maths is needed.

Example:

-RegularPromptMessage 'IT will upgrade ComputerName to Windows 11 24H2. You have PromptsLeft reminder(s) left, one every PromptIntervalHours hour(s).\n\nSave your work and click Upgrade Now.'

On WKS-014, with three prompts remaining and a four-hour interval, the user sees:

IT will upgrade WKS-014 to Windows 11 24H2. You have 3 reminder(s) left, one every 4 hour(s).

Example with the in-progress notice:

-ProgressPromptMessage 'IT is upgrading ComputerName to Windows 11. This has been running for UpgradeElapsedMinutes minute(s).\n\nPlease leave the machine switched on.'

Things to know​

  • These names are reserved words. If a message needs the literal word ComputerName, reword it.
  • Button labels are not configurable. They always follow the user's language.
  • The in-progress notice always carries an OK button. In stay mode, clicking it only hides the notice until the next check.
  • Custom text is not translated and does not receive the automatic connect-to-power line for laptops. Include that wording yourself if your fleet has laptops.

Parameters​

ParameterAliasDefaultDescription
MaxPostpone5Maximum postponements before the final scheduling prompt appears.
IntervalMinutes240Minutes between prompt attempts. Also the wait before any retry.
RegularPromptTimeout600Seconds before an ignored prompt closes and counts as missed. Also used for the completion prompt.
FinalPromptTimeout900Seconds before the final scheduling prompt and the missed upgrade prompt close.
DelayAfterFinalPrompt600Grace period (in seconds) before the upgrade starts after an ignored final prompt.
SuppressPopupTimeWindows24-hour time window to hide prompts (e.g., 1800-0900).
SkipWeekendsFalseHides prompts on Saturdays and Sundays.
IfNotLoggedInFalseUpgrades without a prompt if no user is logged in.
MaxMissedPromptsBeforeForce0Upgrades without a prompt after this many consecutive missed prompts on locked devices. 0 turns this off.
UpgradeDuringSuppressUpdateDuringSuppressFalseLets unattended or forced upgrades run during suppression windows and weekends.
ForceFalseClears active tasks and restarts the prompt cycle from zero.
WithoutPromptFalseSkips every prompt and starts the upgrade right away, cancelling any cycle in progress.
UriDirect https:// link to your own Windows 11 ISO or ZIP file. Empty installs the ProVal image. ProVal is not responsible for custom images.
MinimumFreeSpaceGB24Free space required on the system drive, in GB.
MinimumReservedPartitionFreeMB15Free space required on the system reserved partition, in MB.
SkipBitLockerSafetyCheckFalseContinues when BitLocker lacks the recommended protectors or cannot be suspended.
MaxACPowerRetries3Times the upgrade waits for a laptop to be connected to power before the cycle ends as a failure.
MaxMissedScheduledUpgrades3Missed or unanswered upgrade times allowed before the cycle ends as a failure. 0 ends it at the first missed time.
IconWeb URL, local, or UNC path for the prompt window icon. Copied locally and verified before use.
HeaderImageWeb URL, local, or UNC path for the prompt window header banner. Copied locally and verified before use.
TitleTitle for the regular, final, and missed upgrade prompts. Empty uses the built-in title.
RegularPromptMessageBody of the postponable prompts. Empty uses the built-in wording.
FinalPromptMessageBody of the final scheduling prompt. Empty uses the built-in wording.
MissedUpgradePromptMessageBody of the prompt that asks for a new time after a missed upgrade. Empty uses the built-in wording.
ReminderPromptTitleTitle of the 10-minute warning. Empty uses the built-in title.
ReminderPromptMessageBody of the 10-minute warning. Empty uses the built-in wording.
CompletionPromptTitleTitle of the completion confirmation. Empty uses the built-in title.
CompletionPromptMessageBody of the completion confirmation. Empty uses the built-in wording.
PromptDisplayRetryCount1Extra attempts to display a prompt when it fails to appear or returns unreadable output. 0 gives it a single attempt.
PromptDisplayRetryDelay30Seconds to wait between prompt display attempts.
ShowProgressPromptFalseShows a notice on the user's desktop while the upgrade runs.
ProgressPromptInterval10Minutes between in-progress notices. 0 turns them off. Ignored in stay mode.
ProgressPromptTimeout300Seconds each in-progress notice stays on screen. Ignored in stay mode.
KeepProgressPromptVisibleFalseKeeps the in-progress notice on screen for the whole upgrade and brings it back if dismissed. Overrides the interval settings.
ProgressPromptTitleTitle of the in-progress notice. Empty uses the built-in title.
ProgressPromptMessageBody of the in-progress notice. Empty uses the built-in wording.
ThemeDarkPrompt window theme. Dark or Light.

Logs and Artifacts​

Log Locations​

Logs are written next to the copy of the script that runs.

  • Initial RMM Run: C:\ProgramData\_Automation\Script\Invoke-Windows11InstallerWithPrompt\Invoke-Windows11InstallerWithPrompt-log.txt (or the folder your RMM runs the script from).
  • Scheduled Runs: C:\ProgramData\_Automation\Script\Invoke-Windows11InstallerWithPrompt\Scheduled\Invoke-Windows11InstallerWithPrompt-log.txt
  • Upgrade Tool Output: windows-upgrader-stdout.txt and windows-upgrader-stderr.txt in the same Scheduled folder.
  • Windows Setup Logs: C:\$WINDOWS.~BT\Sources\Panther\setuperr.log. When an upgrade fails, the end of this log is copied into the script log.

Every run ends with one line that starts with Success: or Failure:, so your RMM can report the result.

Scheduled Tasks Created​

  • Scheduled Task - Invoke-Windows11InstallerWithPrompt - Prompt (Displays the regular, final, and missed upgrade prompts)
  • Scheduled Task - Invoke-Windows11InstallerWithPrompt - Reminder (Displays the 10-minute warning)
  • Scheduled Task - Invoke-Windows11InstallerWithPrompt - Progress (Displays the in-progress notice)
  • Scheduled Task - Invoke-Windows11InstallerWithPrompt - Completion (Displays the completion confirmation)
  • Scheduled Task - Invoke-Windows11InstallerWithPrompt - Reschedule (Manages the background cycle and starts the upgrade)
  • Post Reboot - Scheduled Task - Invoke-Windows11InstallerWithPrompt (Checks the upgrade after the restart)

All tasks are removed when the cycle ends, whatever the result.

Sample Prompts - English​

Desktops:

Image1
Image2
Image3

Laptops:

Image4
Image5
Image6

Missed Upgrade Prompt - English​

Image7

Upgrade In Progress Notification - English​

Image8

Completion Prompt - English​

Image9

Sample Prompts - Dutch​

Image10
Image11
Image12

Missed Upgrade Prompt - Dutch​

Image13

Upgrade In Progress Notification - Dutch​

Image14

Completion Prompt - Dutch​

Image15

Changelog​

2026-10-13​

  • Initial version of the document