Skip to main content

User Prompt for Reboot

Purpose

The purpose of this solution is to provide the client with the ability to have Automate prompt the end user to reboot the machine and ensure that the machine eventually gets rebooted (either forcefully or voluntarily by the end user).

Update Notice: 16-December-2024

A new Client, Location, and Computer-Level Exclusion EDF Disable Reboot Prompt has been introduced. Flagging the EDF will exclude the machines at the respective level.

Steps to import the updates:

Image

Update Notice: 06-June-2024

If the proval_RebootPromptWhenPendingReboot system property is set to 1 and the computer has a reboot pending flag, but the Suppress Reboot policy is applied by the patch manager, and the pending reboot flag was set due to a patch job, the machine will be excluded from the script's functionality. Instead, the prompts and reboot will be managed by Automate's built-in Suppress Reboot policy. This may result in inconsistently connected machines not getting a proper reboot.

Associated Content

ContentTypeFunction
Monitor - Reboot Pending [Prompt]Internal MonitorTo monitor for machines the client decides need to be rebooted and issue a script to prompt the user.
Script - User Prompt - RebootScriptTo physically handle the reboot prompting and execution.
Script - Reset Reboot Pending EDFsScriptTo clear all flags indicating the machine needs a reboot so they can be set again later.
Monitor - Reset Reboot Pending EDFsInternal MonitorThis internal monitor is designed to detect the agents whose reboot was done by the script User Prompt - Reboot. It detects the agents and triggers the script Reset Reboot Pending EDFs to clear the EDFs so they can be re-triggered at another time.
Monitor - Machines with Login Bug IssueInternal MonitorThis internal monitor detects the agents with Login Bug Issues that have not been rebooted for more than 7 days since detection.
△ Custom - Autofix - Prompt for Reboot with Forced RebootAlert TemplateThis template is used with the monitor Reboot Pending [Prompt] to schedule the autofix script User Prompt - Reboot.
△ Custom - Autofix - Reset Reboot Pending EDFsAlert TemplateThis template is used with the monitor Reset Reboot Pending EDFs to schedule the autofix script Reset Reboot Pending EDFs.
△ Custom - Ticket Creation - ComputerAlert TemplateThis template is used with the monitor Machines with Login Bug Issue.
Dataview - User Prompt - Reboot [Audit]DataviewThis dataview is designed to track the workings of the User Prompt for the Reboot solution.

Implementation

Updating Process:

  • Remove the monitor 'ProVal - Production - Reboot Pending [Prompt]' (if it exists)
    • Take note of any exclusions made to this monitor; however, there will likely be no customizations to it.
  • Remove the monitor Reset Reboot Pending EDFs (if it exists)
  • Remove the Alert Template '~Autofix - Prompt for Reboot and Force' (or whatever is assigned to the monitor presently; we will be importing a new alert template with this solution).
    • If you cannot find any alert templates configured, skip over this step.
  • Update the script User Prompt - Reboot
  • Update the script Reset Reboot Pending EDFs
  • Import both alert templates '△ Custom - Autofix - Reset Reboot Pending EDFs' and '△ Custom - Autofix - Prompt for Reboot with Forced Reboot'
  • Delete the Reset Reboot Pending EDFs Script Schedule on the All Agents group

Image

  • Proceed through the Fresh Install Process steps.

Fresh Install Process:

  1. Import both scripts outlined in this document (ProSync Plugin)
  2. Import all the monitors outlined in this document (ProSync Plugin)
  3. Import all the alert templates outlined in this document (ProSync Plugin)
  4. Import the dataview outlined in this document (ProSync Plugin)

Configuration Steps:

  1. Set the correct alert templates to the Disabled monitors

Image

  1. Run the script User Prompt - Reboot once on any machine with the user parameter SetEnvironment set to 1:

Image

Running the script with this parameter will import the properties below with default values and also import the EDFs as mentioned below:

  • proval_RebootForceTimeDelayMin - Default Setting [5]
  • proval_RebootPromptWhenPendingReboot - Default Setting [0]
  • proval_RebootPromptUptimeDays - Default Setting [0]
  • proval_RebootPromptMSG - Default Setting [Your computer is currently in need of a reboot.]
  • proval_RebootPromptDurBetweenPrompt - Default Setting [4]
  • proval_RebootPromptCount - Default Setting [4]
  • Proval_RebootPromptUsePrompter - Default Setting [0]

The EDFs imported are:

  1. Last Prompted - Text Box

  2. Times Prompted - Text Box

  3. Pending Reboot - Checkbox

  4. Before enabling the monitors, validate that the monitor will return results when checking the 'Pending Reboot' EDF. Simply pick a random workstation that is online, check the 'Pending Reboot' EDF, and save it:

Image

  1. Then open the Disabled Monitor 'ProVal - Production - Reboot Pending [Prompt]' and validate that the new machine appears in the results:

Image

NOTE: If the count is more than 1, then settings are changed from their defaults, and the consultant should weigh in on whether we should enable the monitors or not.

  1. After confirming that, you can uncheck the pending reboot box from that machine and fully enable all the monitors.
    • It is recommended to keep the monitor targeting globally to ensure the EDFs, when checked, always prompt the user; however, the client may request for the monitor to be more limited, and in this case, you can enable the monitor specifically for certain groups.

Prompter Prompt Examples

Image

Icon and header images can be set by https://redirhostname/WCC2/Utilities/HeaderImage

At the final prompt, you will receive this popup through Windows FIRST:

Image

Then this will pop up, explaining the reboot:

Image

Automate Prompt Examples

Image

Image

Image

Image

At the final prompt, you will receive this popup through Windows FIRST:

Image

Then this will pop up, explaining the reboot:

Image

EDF Examples

  • Pending Reboot [Checkbox - Manually Editable]
    • Image
  • Last Prompted [Text Field - Non Editable]
    • Image
  • Times Prompted [Text Field - Non Editable]
    • Image

Customizations

PropertyDescriptionDefault Setting
System Property: proval_RebootPromptCountHow many times the user will be prompted4
System Property: proval_RebootPromptDurBetweenPromptAmount of time in hours between prompts4
System Property: proval_RebootPromptMSGThe default message for the reboot prompt'Your computer is currently in need of a reboot.'
System Property: proval_RebootPromptUptimeDaysAutomatically sets the reboot prompt flag after X days of machine uptime0 (Disabled)
System Property: proval_RebootPromptWhenPendingRebootToggles this solution on the Windows embedded reboot flag0 (Disabled)
System Property: proval_RebootForceTimeDelayMinAdjusts the time delay on the forced reboot in minutes5
System Property: Proval_RebootPromptUsePrompterUse Prompter instead of Automate's default prompts/messages0 (Disabled)

Exclusion EDFs

NameTypeSectionLevelDescription
Disable Reboot PromptCheckboxExclusionsClientFlag this EDF to exclude the client from the solution.
Disable Reboot PromptCheckboxExclusionsLocationFlag this EDF to exclude the location from the solution.
Disable Reboot PromptCheckboxExclusionsComputerFlag this EDF to exclude the computer from the solution.