Skip to content

Latest commit

 

History

History
120 lines (65 loc) · 4.13 KB

IntuneScriptLab.md

File metadata and controls

120 lines (65 loc) · 4.13 KB
document type module
Help Version 1.0.0.0
HelpInfoUri
Locale en-US
Module Guid 3f6b2c9e-7d41-4a8f-9c2b-5e0d8a1f4b76
Module Name IntuneScriptLab
ms.date 09/28/2026
PlatyPS schema version 2024-05-01
title IntuneScriptLab Module

IntuneScriptLab Module

Description

Test Intune scripts before Intune does: static rules, a runtime harness, Pester assertions, a Graph pre-flight over the tenant's deployed scripts and readers for the agent's logs

IntuneScriptLab Cmdlets

Asserts a requirement result meets its rule (alias Should-BeIntuneApplicable).

Asserts a Win32 detection result counts as installed (alias Should-BeIntuneDetected).

Asserts the RunState of a platform script result (alias Should-HaveIntuneRunState).

Asserts a remediation or Win32 result Status (alias Should-HaveIntuneStatus).

Asserts a requirement result fails its rule (alias Should-NotBeIntuneApplicable).

Asserts a Win32 detection result counts as not installed (alias Should-NotBeIntuneDetected).

Asserts Test-IntuneScript finds nothing at Warning or above (alias Should-PassIntuneAnalysis).

Reports where a tenant's deployed scripts differ from the copies in a folder or repository.

Packs the agent's logs, its registry state and the parsed timelines into one zip for a ticket.

Writes IntuneScriptLab findings as a SARIF 2.1.0 log for code scanning.

Reads the Intune Management Extension logs as objects, with the events the agent's lines record.

One timeline per policy or app from the agent's logs: the steps it went through and how they ended.

Returns IntuneScriptLab's PSScriptAnalyzer rule module, for -CustomRulePath.

One line per deployed script policy: findings, drift, assignment and what the devices report.

Runs a Win32 custom detection script like Intune and returns the verdict.

Runs a platform (device) script the way Intune does and reports its run state.

Runs a detection/remediation pair like Intune and reports the portal status.

Runs a Win32 requirement script like Intune and applies the rule to its output.

Runs a Win32 app's detect → install → detect flow the way the Intune agent does.

Applies the mechanical fixes for findings that have one, and reports what is left.

Evaluates an assignment filter rule against a device the way the Intune service does.

Analyzes the scripts a tenant has deployed, with the settings each policy actually carries.

Checks a PowerShell script for the mistakes Intune turns into silent failures.

Checks a Win32 app's base requirements against this device the way the Intune agent reports them.

Applies a Win32 app file, registry or MSI rule to this device the way the Intune agent does.