Skip to main content

OEM Update With Prompts

Summary

This is the ConnectWise Automate implementation of the agnostic script Invoke-OEMUpdateWithPrompt.

The script prompts logged-in users before BIOS and firmware updates, allows postponement for a configured number of cycles, and then enforces the update. It is designed for a single deployment from Automate, then continues through scheduled task re-runs on the endpoint.

How Configuration Works

The script reads settings in this order:

  1. User parameters passed at runtime (highest priority).
  2. Client-level EDF values.
  3. System property values.
  4. Script defaults in the agnostic payload (if no value exists in Automate).

Only these runtime user parameters are used for update behavior overrides:

  • Force
  • UsePsWindowsUpdate
  • IfNotLoggedIn
  • HandleBitLocker

All other behavior should be controlled through client-level EDFs or system properties.

Dependencies

Sample Run

First Run (Environment Setup)

Run the script first with Set_Environment set to 1. This creates or refreshes:

  • Required system properties.
  • Required client-level EDF definitions.

Expected output:

  • Properties and EDF definitions are inserted if missing.

Image1

Scenario 1: Default Runtime Using Property Values

Run the script without any override user parameters.

Expected output:

  • Script uses system property values for prompt count, interval, timeout, and suppress window.
  • Prompt cycle starts and self-reschedules through scheduled tasks.

Image2

Scenario 2: Client-Level EDF Overrides

Set client EDF values for OUWP_MaxPostPone and OUWP_IntervalMinutes, then run with no user overrides.

Expected output:

  • Script uses client EDF values instead of global property values for those settings.
  • Remaining settings continue to come from system properties unless also overridden.

Image3

Scenario 3: Runtime Override for UsePsWindowsUpdate

Run with user parameter UsePsWindowsUpdate = 1.

Expected output:

  • UsePsWindowsUpdate is enabled for this run even if EDF/property is 0.
  • Update execution path uses Install-WindowsUpdates flow.

Image4

Scenario 4: Runtime Override for IfNotLoggedIn

Run with user parameter IfNotLoggedIn = 1.

Expected output:

  • If no user session is active, update starts without prompting.
  • If a user is logged in, normal prompt workflow continues.

Image5

Scenario 5: Runtime Override for HandleBitLocker

Run with user parameter HandleBitLocker = 1.

Expected output:

  • BitLocker is suspended before update execution for one reboot cycle.
  • If no reboot is needed, BitLocker is resumed at completion.

Image6

Scenario 6: Force Restart of Prompt Cycle

Run with user parameter Force = 1.

Expected output:

  • Existing OEM prompt scheduled tasks are removed.
  • Stored prompt state is reset.
  • Prompt workflow starts again from the beginning.

Image7

User Parameters

NameExampleRequiredDescription
Set_Environment1True (first run only)Set to 1 on first run to create required system properties and client-level EDF definitions.
Force1FalseHighest-priority runtime switch. Accepts 0 or 1. Set to 1 to reset prompt state and recreate scheduled task workflow. Set to 0 (or leave blank) for normal behavior.
UsePsWindowsUpdate1FalseHighest-priority runtime switch. Accepts 0 or 1. Set to 1 to use PSWindowsUpdate instead of OEM-specific update tools. Set to 0 to use OEM-specific tools.
IfNotLoggedIn0FalseHighest-priority runtime switch. Accepts 0 or 1. Set to 1 to run updates without prompting when no user session is active. Set to 0 to wait for a logged-in user so prompts can be shown.
HandleBitLocker1FalseHighest-priority runtime switch. Accepts 0 or 1. Set to 1 to suspend BitLocker before update execution. Set to 0 to leave BitLocker handling unchanged.

System Properties

NameDefaultExampleRequiredDescription
OUWP_MaxPostPone53TrueDefault maximum postponements before final prompt.
OUWP_IntervalMinutes240120TrueDefault minutes between prompt attempts.
OUWP_RegularPromptTimeoutSeconds600600TrueDefault timeout for regular prompts.
OUWP_FinalPromptTimeoutSeconds900900TrueDefault timeout for the final scheduling prompt.
OUWP_DelayAfterFinalPromptSeconds900600TrueDefault delay before forced execution after final timeout.
OUWP_SuppressPopupTimeWindowsblank1800-0900FalseOptional suppress window in HHmm-HHmm format, for example 1800-0900.
OUWP_SkipWeekends01FalseOptional switch that accepts 0 or 1. Set to 1 to skip prompts/updates on weekends. Set to 0 to allow weekend processing.
OUWP_IfNotLoggedIn10FalseDefault unattended behavior switch that accepts 0 or 1. Set to 1 to continue when no user is logged in. Set to 0 to wait for an active user session. Can be overridden at client EDF or runtime.
OUWP_UsePsWindowsUpdate01FalseDefault update path switch that accepts 0 or 1. Set to 1 to use PSWindowsUpdate. Set to 0 to use OEM update tools. Can be overridden at client EDF or runtime.
OUWP_HandleBitLocker01FalseDefault BitLocker switch that accepts 0 or 1. Set to 1 to suspend BitLocker before updates. Set to 0 to leave BitLocker handling unchanged. Can be overridden at client EDF or runtime.
OUWP_Iconhttps://%redirhostname%/WCC2/Utilities/HeaderImagehttps://example.com/icon.pngFalseOptional icon source for prompt window.
OUWP_HeaderImagehttps://%redirhostname%/WCC2/Utilities/HeaderImagehttps://example.com/header.pngFalseOptional header image source for prompt window.

Image8

Client-Level EDF

All EDF names below are created in the section OEM Update With Prompts and override system properties when populated with valid values.

NameTypeSectionExampleDescription
OUWP_MaxPostPoneTextOEM Update With Prompts3Overrides OUWP_MaxPostPone for this client.
OUWP_IntervalMinutesTextOEM Update With Prompts120Overrides OUWP_IntervalMinutes for this client.
OUWP_RegularPromptTimeoutSecondsTextOEM Update With Prompts600Overrides OUWP_RegularPromptTimeoutSeconds for this client.
OUWP_FinalPromptTimeoutSecondsTextOEM Update With Prompts900Overrides OUWP_FinalPromptTimeoutSeconds for this client.
OUWP_DelayAfterFinalPromptSecondsTextOEM Update With Prompts600Overrides OUWP_DelayAfterFinalPromptSeconds for this client.
OUWP_SuppressPopupTimeWindowsTextOEM Update With Prompts1800-0900Overrides OUWP_SuppressPopupTimeWindows for this client when format is valid.
OUWP_SkipWeekendsTextOEM Update With Prompts1Accepts 0 or 1 for this client. Set to 1 to skip weekend processing for this client only. Set to 0 to allow weekend processing.
OUWP_IfNotLoggedInTextOEM Update With Prompts0Accepts 0 or 1 for this client. Set to 1 to run when no user is logged in. Set to 0 to wait for a logged-in user. Overrides system property unless runtime parameter is provided.
OUWP_UsePsWindowsUpdateTextOEM Update With Prompts1Accepts 0 or 1 for this client. Set to 1 to use PSWindowsUpdate. Set to 0 to use OEM update tools. Overrides system property unless runtime parameter is provided.
OUWP_HandleBitLockerTextOEM Update With Prompts0Accepts 0 or 1 for this client. Set to 1 to suspend BitLocker before updates. Set to 0 to leave BitLocker handling unchanged. Overrides system property unless runtime parameter is provided.
OUWP_IconTextOEM Update With Promptshttps://example.com/icon.pngOverrides OUWP_Icon for this client.
OUWP_HeaderImageTextOEM Update With Promptshttps://example.com/header.pngOverrides OUWP_HeaderImage for this client.

Image9

Output

  • Script Logs

Scheduled Tasks

  • Scheduled_Task_Invoke-OEMUpdatePrompt
  • Scheduled_Task_Invoke-OEMUpdatePrompt_Reschedule

Potential Log Files

- C:\ProgramData\_Automation\Script\Invoke-OEMUpdatePrompt\Invoke-OEMUpdateWithPrompt-log.txt
- C:\ProgramData\_Automation\Script\Invoke-OEMUpdatePrompt\Invoke-OEMUpdateWithPrompt-error.txt
- C:\ProgramData\_Automation\Script\Install-OEMUpdates\Install-OEMUpdates-log.txt
- C:\ProgramData\_Automation\Script\Initialize-DellCommandUpdate\Initialize-DellCommandUpdate-log.txt
- C:\ProgramData\_Automation\Script\Initialize-DellCommandUpdate\Initialize-DellCommandUpdate-error.txt
- C:\ProgramData\_Automation\Script\Initialize-HPSupportAssistant\Initialize-HPSupportAssistant-log.txt
- C:\ProgramData\_Automation\Script\Initialize-HPSupportAssistant\Initialize-HPSupportAssistant-error.txt
- C:\ProgramData\_Automation\Script\Install-LenovoUpdates\Install-LenovoUpdates-log.txt
- C:\ProgramData\_Automation\Script\Install-LenovoUpdates\Install-LenovoUpdates-error.txt
- C:\ProgramData\_Automation\Script\Install-WindowsUpdates\Install-WindowsUpdates-log.txt
- C:\ProgramData\_Automation\Script\Install-WindowsUpdates\Install-WindowsUpdates-error.txt

Sample Prompts - English

Image1
Image2
Image3

Completion Acknowledgement Prompt (No Reboot Pending)

Image7

FAQ

Q: Which Windows versions are supported by this script?

A: This script is supported only on Windows 10 and Windows 11 endpoints. It is not intended for older Windows versions or non-Windows systems.

Q: Will I get final update success or failure confirmation in ConnectWise Automate script output?

A: Not fully. Automate starts the workflow, but most of the process runs later through scheduled tasks on the endpoint. Because of that, the original script run in Automate will not always show the final status.

Q: If Automate does not show the final result, where do I check what happened?

A: Check the log files on the endpoint. Those logs contain the best details for completion status and failure reasons.

Common log paths:

- C:\ProgramData\_Automation\Script\Invoke-OEMUpdatePrompt\Invoke-OEMUpdateWithPrompt-log.txt
- C:\ProgramData\_Automation\Script\Invoke-OEMUpdatePrompt\Invoke-OEMUpdateWithPrompt-error.txt
- C:\ProgramData\_Automation\Script\Install-OEMUpdates\Install-OEMUpdates-log.txt

Q: How do I decide which machines should run this script?

A: First use vendor-specific update audit solutions to identify devices that need OEM driver, BIOS, or firmware remediation, then deploy this script to those targets.

Recommended vendor-specific solutions:

Q: Which value wins if the same switch exists in runtime parameter, client EDF, and system property?

A: Priority is runtime parameter, then client EDF, then system property.

Example with IfNotLoggedIn:

  • System property OUWP_IfNotLoggedIn = 1
  • Client EDF OUWP_IfNotLoggedIn = 1
  • Runtime IfNotLoggedIn = 0

Result: runtime value 0 wins for that run.

If runtime is not provided, client EDF wins. If neither runtime nor EDF is provided, system property is used.

Q: Can I allow unattended installs for all clients, but block unattended installs for one specific client?

A: Yes.

Set global system property OUWP_IfNotLoggedIn = 1 to allow unattended installs by default. Then set that specific client EDF OUWP_IfNotLoggedIn = 0 to require a logged-in user for that client. Do not pass runtime IfNotLoggedIn = 1 for that execution, because runtime overrides both EDF and property.

Q: If IfNotLoggedIn is enabled and no user is logged in when the next prompt cycle runs, what happens?

A: The script does not wait for another prompt. It starts the update workflow unattended.

Q: What if IfNotLoggedIn is disabled and no one is logged in at that time?

A: The script does not start unattended updates. It waits for a logged-in session so prompts can be shown according to the configured cycle.

Changelog

2026-05-22

  • Initial version of the document.