Skip to content

improvement(non-interactive): make UserInteractive prompt-gate the standard (docs + core-isolation)#104

Closed
Gumbees wants to merge 1 commit into
mainfrom
improvement/non-interactive-standard
Closed

improvement(non-interactive): make UserInteractive prompt-gate the standard (docs + core-isolation)#104
Gumbees wants to merge 1 commit into
mainfrom
improvement/non-interactive-standard

Conversation

@Gumbees

@Gumbees Gumbees commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

What

Adopt if ($env:RMM -ne "1" -and [Environment]::UserInteractive) as the standard input-handling gate, so a missing/renamed/unseen RMM variable can never leave a script stuck on Read-Host ("Windows PowerShell is in NonInteractive mode") in an unattended NinjaRMM run.

  • CLAUDE.md — document the gate as the standard; "never gate solely on $env:RMM."
  • script-template-powershell.ps1 — template gate updated to match.
  • msft-windows-enable-core-isolation.ps1 / -disable-core-isolation.ps1 — added only the -and [Environment]::UserInteractive part; bare $RMM left as-is per the earlier revert (Revert #97 (core-isolation $env: change) #98). These were the only scripts edited today still missing the guard.

Checkpoint scripts (#100) and suspend-bitlocker (#101) already carry this gate.

Not changed

Core-isolation logic, exit codes, and their (reverted) $RMM style are untouched apart from the guard.

⚠️ Deployment

As always, merging does not update NinjaOne — deployed copies must be refreshed from main.

🤖 Generated with Claude Code

…e standard

The interactive branch must never be reachable in an unattended run. Gate it on
`[Environment]::UserInteractive` so a missing/renamed/unseen RMM variable can't
drop the script into Read-Host (which errors "NonInteractive mode" and loops).

- Core-isolation enable/disable: add `-and [Environment]::UserInteractive` to the
  existing gate (bare $RMM left as-is per the earlier revert -- non-interactive
  part only).
- CLAUDE.md: document the gate as the input-handling standard.
- script-template-powershell.ps1: update the template gate to match.

Checkpoint scripts (#100) and suspend-bitlocker (#101) already carry this gate.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Gumbees Gumbees added type:enhancement New work that adds or improves capability (Halo: Enhancement) category:improvement Hardening or polish on existing capability labels Jun 24, 2026

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Code review skipped — your organization's overage spend limit has been reached.

Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.

Once credits are available, push a new commit or reopen this pull request to trigger a review.

@Gumbees

Gumbees commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #105, which drops the RMM variable rather than keeping it as an optional override, and carries the CLAUDE.md + template standard update.

@Gumbees Gumbees closed this Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:improvement Hardening or polish on existing capability type:enhancement New work that adds or improves capability (Halo: Enhancement)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant