Skip to content

Create Windows - Enable Quick Machine Recovery & Set Parameters for J…#730

Open
ReedSavoryArcadiaFunds wants to merge 1 commit intoTheJumpCloud:masterfrom
ReedSavoryArcadiaFunds:master
Open

Create Windows - Enable Quick Machine Recovery & Set Parameters for J…#730
ReedSavoryArcadiaFunds wants to merge 1 commit intoTheJumpCloud:masterfrom
ReedSavoryArcadiaFunds:master

Conversation

@ReedSavoryArcadiaFunds
Copy link
Copy Markdown

@ReedSavoryArcadiaFunds ReedSavoryArcadiaFunds commented Mar 27, 2026

JumpCloud

Commands Gallery

Enable Windows Quick Machine Recovery & Set Parameters for JumpCloud

Since JumpCloud doesn't have a policy for this I've developed a bulletproof JumpCloud command to enable the new Windows Quick Machine Recovery functionality and set the optional parameters for the feature, and which works universally on all Windows 11 platforms (both x86/x64 and Windows On ARM as well).


Note

Medium Risk
Enables and configures Windows recovery behavior via reagentc, which modifies OS-level recovery settings and could impact device remediation behavior if misconfigured or run on unsupported systems.

Overview
Adds a new JumpCloud PowerShell command that enables Windows 11 Quick Machine Recovery and applies recovery settings by writing a base64-encoded XML config to disk and invoking reagentc /enable plus reagentc /setrecoverysettings under a forced 64-bit PowerShell context.

Includes inline reference presets (XML + base64) for common remediation schedules, with the script defaulting to an every-12-hours auto-remediation check, and returns a TRUE/FALSE result with step exit codes for JumpCloud reporting.

Written by Cursor Bugbot for commit df97a7b. This will update automatically on new commits. Configure here.

…umpCloud

Commands Gallery

Enable Windows Quick Machine Recovery & Set Parameters for JumpCloud

Since JumpCloud doesn't have a policy for this I've developed a bulletproof JumpCloud command to enable the new Windows Quick Machine Recovery functionality and set the optional parameters for the feature, and which works universally on all Windows 11 platforms (both x86/x64 and Windows On ARM as well).
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

}
'@
#------ Do not modify below this line ---------------
& (Join-Path ($PSHOME -replace 'syswow64', 'sysnative') powershell.exe) -Command "& {$64BitCommand}"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing markdown format breaks gallery import mechanism

High Severity

This file is missing the .md extension and the standard JumpCloud Commands Gallery markdown structure. Every other file in the Windows Commands directory uses .md and follows a specific format with #### Name, #### commandType, #### Command (with fenced code blocks), #### Description, and #### _Import This Command_ sections. Without this structure, Import-JCCommand won't be able to parse and import the command into a JumpCloud tenant, making the gallery entry non-functional.

Fix in Cursor Fix in Web

$code1 = $LASTEXITCODE

& $r /setrecoverysettings /path "$xmlPath"
$code2 = $LASTEXITCODE
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Undocumented reagentc parameter may cause command failure

Medium Severity

The reagentc /setrecoverysettings /path invocation uses a parameter that doesn't appear in Microsoft's documented reagentc.exe options. The documented parameters are /enable, /disable, /setreimage, /boottore, /info, /setbootshelllink, and /setrecoverytestmode. If this parameter is invalid, the command will fail silently (non-zero exit code), and the script will report FALSE without the QMR settings actually being applied.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant