IntuneScriptLab

0.35.0

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

Minimum PowerShell version

5.1

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name IntuneScriptLab

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name IntuneScriptLab

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

(c) 2026 Jeffrey Stuhr. All rights reserved.

Package Details

Author(s)

  • Jeffrey Stuhr

Tags

Intune Remediation Win32 PSScriptAnalyzer Lint Endpoint Pester

Functions

Test-IntuneScript Invoke-IntuneDetectionTest Invoke-IntuneRemediationTest Invoke-IntunePlatformScriptTest Invoke-IntuneWin32AppTest Invoke-IntuneRequirementTest Test-IntuneWin32Rule Test-IntuneWin32Requirement Get-IntuneAgentLog Get-IntuneAgentTimeline Export-IntuneAgentDiagnostic Get-IntuneAnalyzerRulePath Test-IntuneDeployedScript Compare-IntuneDeployedScript Get-IntuneScriptHealth Export-IntuneFindingSarif Repair-IntuneScript Test-IntuneAssignmentFilter Assert-HaveIntuneStatus Assert-BeIntuneDetected Assert-NotBeIntuneDetected Assert-HaveIntuneRunState Assert-PassIntuneAnalysis Assert-BeIntuneApplicable Assert-NotBeIntuneApplicable

PSEditions

Desktop Core

Dependencies

This module has no dependencies.

Release Notes

0.35.0 - The module follows ai-powershell-standards 2.0.0. Every command now ends on a failure the
       way a compiled cmdlet does, and each failure the module detects has an error ID of its own,
       listed in the README. A script that calls a command and must stop when it fails sets
       $ErrorActionPreference = 'Stop' or makes the call inside try, and a build gate on
       Test-IntuneScript passes -ErrorAction Stop, or it passes on scripts that were never
       analyzed. The commands that take several scripts or logs report one that fails and go on
       with the rest. -WhatIf and -Confirm preview the commands that run a script or write a
       report. A run as another account copies its script to a folder that only SYSTEM, the
       Administrators, the caller and the run's own account can change. The module runs under
       strict mode, and its static tables are data files under Data. See CHANGELOG.md.
0.34.0 - Evidence correction. Test-IntuneDeployedScript cited the round 9 include-plus-exclude
       experiment as a policy no device runs; the device has run it every hour since, because the
       service drops the exclusion and keeps the include. The evidence names the two experiments
       that do show a policy without an include never running, and Findings records the corrected
       result; the command's verdict, silence on such a policy, was already right. A file
       doesNotExist finding now cites the experiment that exists. The validation kit restarts the
       agent by stopping its process, since Restart-Service restarted nothing, and its lab scripts
       and docs are current. See CHANGELOG.md.
0.33.0 - The CI pieces, after a run against a repository laid out the way the templates describe.
       The gate script no longer analyzes a Pester suite next to the scripts or the contents of a
       Win32 app's Package folder, both of which the suite template puts there and both of which
       failed a build at -FailOn Warning for findings that do not apply to them; its GitHub
       annotations percent-encode the file and title values as well as the message.
       Export-IntuneFindingSarif describes the assignment, filter and schedule rules, gives a
       mixed-severity rule the level of its worst finding, and writes a policy check, which has no
       script behind it, as a result without a location instead of throwing. The workflow template
       uses checkout@v7 and upload-sarif@v4; the suite template names its static tests by package
       and runs the device's own 64-bit host, so it works on Windows on ARM. See CHANGELOG.md.
Earlier versions, 0.1.0 to 0.32.0: CHANGELOG.md, which ships with the module.

FileList

Version History

Version Downloads Last updated
0.35.0 (current version) 10 11/30/2026
0.34.0 40 10/15/2026
0.33.0 8 10/15/2026
0.32.0 8 10/14/2026
0.31.0 11 10/9/2026
0.30.0 9 10/8/2026
0.29.0 9 10/7/2026
0.28.0 8 10/6/2026
0.27.0 12 10/6/2026
0.26.0 14 9/29/2026
0.25.0 6 9/28/2026
Show more