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
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
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
- IntuneScriptLab.nuspec
- CHANGELOG.md
- IntuneScriptLab.Format.ps1xml
- Private\Find-IslAstNode.ps1
- Private\Get-IslVariableCredentialSource.ps1
- Private\Write-IslTextFile.ps1
- Private\Find-IslCommand.ps1
- Private\Get-IslVersionPart.ps1
- PSScriptAnalyzer\IntuneScriptLab.Rules.psm1
- IntuneScriptLab.psd1
- Private\Find-IslLocalScript.ps1
- Private\Get-IslWin32Outcome.ps1
- Public\Assert-BeIntuneApplicable.ps1
- IntuneScriptLab.psm1
- Private\Get-IslAgentLogEvent.ps1
- Private\Get-IslWindowsReleaseBuild.ps1
- Public\Assert-BeIntuneDetected.ps1
- LICENSE
- Private\Get-IslAssignmentFilter.ps1
- Private\Grant-IslFolderAccess.ps1
- Public\Assert-HaveIntuneRunState.ps1
- README.md
- Private\Get-IslAssignmentSummary.ps1
- Private\Invoke-IslGraphRequest.ps1
- Public\Assert-HaveIntuneStatus.ps1
- Data\AgentLogEvents.psd1
- Private\Get-IslAstIndex.ps1
- Private\Invoke-IslGraphRequestOnce.ps1
- Public\Assert-NotBeIntuneApplicable.ps1
- Data\InboxModules.psd1
- Private\Get-IslContentHash.ps1
- Private\Invoke-IslNativeCommand.ps1
- Public\Assert-NotBeIntuneDetected.ps1
- Data\RuleOrder.psd1
- Private\Get-IslCoreOnlyFeature.ps1
- Private\Invoke-IslProcess.ps1
- Public\Assert-PassIntuneAnalysis.ps1
- Data\WindowsReleaseBuilds.psd1
- Private\Get-IslCredentialArgument.ps1
- Private\Invoke-IslScriptRun.ps1
- Public\Compare-IntuneDeployedScript.ps1
- en-US\about_IntuneScriptLab.help.txt
- Private\Get-IslCredentialSource.ps1
- Private\Invoke-IslWin32ContentCommand.ps1
- Public\Export-IntuneAgentDiagnostic.ps1
- en-US\IntuneScriptLab-Help.xml
- Private\Get-IslDesktopModulePath.ps1
- Private\Invoke-IslWin32DetectionPass.ps1
- Public\Export-IntuneFindingSarif.ps1
- Examples\intune-script-gate.yml
- Private\Get-IslDeviceFact.ps1
- Private\New-IslErrorRecord.ps1
- Public\Get-IntuneAgentLog.ps1
- Examples\IntuneScriptLab.settings.psd1
- Private\Get-IslDsregStatus.ps1
- Private\New-IslFilterParser.ps1
- Public\Get-IntuneAgentTimeline.ps1
- Examples\IntuneScripts.Tests.ps1.template
- Private\Get-IslExportReport.ps1
- Private\New-IslFinding.ps1
- Public\Get-IntuneAnalyzerRulePath.ps1
- Examples\Invoke-IntuneScriptGate.ps1
- Private\Get-IslFilterDeviceFact.ps1
- Private\New-IslRequirementCheck.ps1
- Public\Get-IntuneScriptHealth.ps1
- Private\Add-IslFilterEscapeError.ps1
- Private\Get-IslFilterProperty.ps1
- Private\New-IslRunFolder.ps1
- Public\Invoke-IntuneDetectionTest.ps1
- Private\Add-IslFilterParseError.ps1
- Private\Get-IslFilterToken.ps1
- Private\Read-IslFilterClause.ps1
- Public\Invoke-IntunePlatformScriptTest.ps1
- Private\Add-IslFilterWarning.ps1
- Private\Get-IslFilterWarningMessage.ps1
- Private\Read-IslFilterConjunction.ps1
- Public\Invoke-IntuneRemediationTest.ps1
- Private\Assert-IslTextLength.ps1
- Private\Get-IslGraphRetryDelay.ps1
- Private\Read-IslFilterExpression.ps1
- Public\Invoke-IntuneRequirementTest.ps1
- Private\Compare-IslFilterVersion.ps1
- Private\Get-IslHostArchitecture.ps1
- Private\Read-IslFilterPrimary.ps1
- Public\Invoke-IntuneWin32AppTest.ps1
- Private\Compare-IslPolicyScript.ps1
- Private\Get-IslHostPath.ps1
- Private\Read-IslFilterValue.ps1
- Public\Repair-IntuneScript.ps1
- Private\Compare-IslRequirementOutput.ps1
- Private\Get-IslInboxModule.ps1
- Private\Resolve-IslAccount.ps1
- Public\Test-IntuneAssignmentFilter.ps1
- Private\Compare-IslRuleValue.ps1
- Private\Get-IslIntuneOutput.ps1
- Private\Resolve-IslRulePath.ps1
- Public\Test-IntuneDeployedScript.ps1
- Private\Compare-IslScriptSetting.ps1
- Private\Get-IslLineEnding.ps1
- Private\Select-IslRuleCandidate.ps1
- Public\Test-IntuneScript.ps1
- Private\Compress-IslFolder.ps1
- Private\Get-IslLineExcerpt.ps1
- Private\Stop-IslProcessTree.ps1
- Public\Test-IntuneWin32Requirement.ps1
- Private\ConvertFrom-IslCmTraceLog.ps1
- Private\Get-IslLocalScriptSetting.ps1
- Private\Test-IslAssignmentFilter.ps1
- Public\Test-IntuneWin32Rule.ps1
- Private\ConvertFrom-IslFilterRule.ps1
- Private\Get-IslLogonSession.ps1
- Private\Test-IslCommandParameter.ps1
- Private\Rules\Find-IslArchitectureIssue.ps1
- Private\ConvertFrom-IslRuleSpec.ps1
- Private\Get-IslMapEntry.ps1
- Private\Test-IslDeviceGroup.ps1
- Private\Rules\Find-IslArm64Assumption.ps1
- Private\ConvertTo-IslAccount.ps1
- Private\Get-IslMsiProduct.ps1
- Private\Test-IslExitFollowsReturn.ps1
- Private\Rules\Find-IslContextIssue.ps1
- Private\ConvertTo-IslCmTraceTime.ps1
- Private\Get-IslOemEncoding.ps1
- Private\Test-IslFilterClause.ps1
- Private\Rules\Find-IslEncodingIssue.ps1
- Private\ConvertTo-IslDeploymentFinding.ps1
- Private\Get-IslPropertyValue.ps1
- Private\Test-IslFilterConnector.ps1
- Private\Rules\Find-IslExecutionPolicyCall.ps1
- Private\ConvertTo-IslDriftResult.ps1
- Private\Get-IslRegexLiteralPrefix.ps1
- Private\Test-IslFilterEscapedQuote.ps1
- Private\Rules\Find-IslExitCodeIssue.ps1
- Private\ConvertTo-IslHealthReport.ps1
- Private\Get-IslRegistryText.ps1
- Private\Test-IslFilterNode.ps1
- Private\Rules\Find-IslInteractiveCall.ps1
- Private\ConvertTo-IslNamedGroupPattern.ps1
- Private\Get-IslReturnReplacement.ps1
- Private\Test-IslInboxModuleName.ps1
- Private\Rules\Find-IslLongSleep.ps1
- Private\ConvertTo-IslNameKey.ps1
- Private\Get-IslRunSummary.ps1
- Private\Test-IslInsideFunction.ps1
- Private\Rules\Find-IslModuleDependency.ps1
- Private\ConvertTo-IslPolicyFinding.ps1
- Private\Get-IslScriptContext.ps1
- Private\Test-IslInsideTryWithCatch.ps1
- Private\Rules\Find-IslOutputIssue.ps1
- Private\ConvertTo-IslSarifLocation.ps1
- Private\Get-IslScriptDifference.ps1
- Private\Test-IslPesterAssertionSupport.ps1
- Private\Rules\Find-IslPowerShell7Syntax.ps1
- Private\ConvertTo-IslScriptText.ps1
- Private\Get-IslSelectedPolicy.ps1
- Private\Test-IslPolicyAssignment.ps1
- Private\Rules\Find-IslRebootCommand.ps1
- Private\ConvertTo-IslSettingsObject.ps1
- Private\Get-IslSetting.ps1
- Private\Test-IslPolicyScript.ps1
- Private\Rules\Find-IslRelativePath.ps1
- Private\ConvertTo-IslWin32RelatedResult.ps1
- Private\Get-IslStringLiteral.ps1
- Private\Test-IslPolicySelected.ps1
- Private\Rules\Find-IslScriptSize.ps1
- Private\Copy-IslSharedFile.ps1
- Private\Get-IslSuppression.ps1
- Private\Test-IslRuleSelected.ps1
- Private\Rules\Find-IslSignatureIssue.ps1
- Private\Get-IslTrimmedLine.ps1