IntuneScriptLab
0.27.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.27.0 - Harness: a user-context run started from PowerShell 7 gave the 5.1 host PowerShell 7's
module path (no Cert: drive, Security cmdlets failing to load); -Credential did not find
a Microsoft Entra account's session, because Windows names such an account after its
display name and not its sign-in name; a refused folder grant lost its message under
-ErrorAction Stop on 5.1. Rules, from a tenth validation round: IslPowerShell7Syntax says
that a 7-only cmdlet, parameter or -Parallel fails where it stands and the script carries
on, and flags Out-File -Encoding utf8NoBOM, which was listed and never matched;
IslInteractiveCall warns instead of erring when Get-Credential -Credential is handed
something that may be a built credential; IslContextIssue's drive-letter finding is
Information, since the letter cannot say whether it is a mapped drive.
Repair-IntuneScript no longer turns 'return 1; exit 1' into '1; exit 0; exit 1' with no
finding left. Help: what Invoke-ScriptAnalyzer -Severity does with the custom rules. See
CHANGELOG.md.
0.26.0 - Every claim in the README, help, about topic, rule reference and examples was checked
against the code and by running it, and what did not hold was fixed: -Settings never
reached the pre-flight or the drift compare; -Id alone selected every policy;
Repair-IntuneScript -WhatIf on a folder returned nothing; the encoding fix corrupted
ANSI files; a directive earned the assumed-context note; a settings file's ExcludeRule
beat an explicit -IncludeRule; Should-PassIntuneAnalysis failed on a pipeline of files;
SARIF rule levels, outside-root URIs and relative output paths; a missing script path
returned a result; timeline -Id and relationship reports; case-insensitive drift
compare; All devices for a user-context app; -SkipAnalysis hiding 'assigned to nobody';
-ne/-notIn filter values; a bare -Confirm; Stop as a guard; using module and two
parameters in the PowerShell 7 rule; Win32 scripts in the size rule. Help corrected
throughout. See CHANGELOG.md.
0.25.0 - The first release from the module's own repository, github.com/fadwen/IntuneScriptLab, and
the first published to the PowerShell Gallery. Nothing any command does has changed: the
build scripts moved under Build\, the manifest points at the new repository, and releases
run from a version tag through the repository's release workflow.
Earlier versions, 0.1.0 to 0.24.0: CHANGELOG.md, which ships with the module.
FileList
- IntuneScriptLab.nuspec
- CHANGELOG.md
- Private\Get-IslAgentLogEvent.ps1
- Private\Invoke-IslProcess.ps1
- Public\Test-IntuneAssignmentFilter.ps1
- IntuneScriptLab.Format.ps1xml
- Private\Get-IslDesktopModulePath.ps1
- Private\Invoke-IslScriptRun.ps1
- Public\Test-IntuneDeployedScript.ps1
- Private\Get-IslDeviceFact.ps1
- Private\New-IslFinding.ps1
- Public\Test-IntuneScript.ps1
- IntuneScriptLab.psd1
- Private\Get-IslDsregStatus.ps1
- Private\Resolve-IslAccount.ps1
- Public\Test-IntuneWin32Requirement.ps1
- IntuneScriptLab.psm1
- Private\Get-IslExportReport.ps1
- Private\Resolve-IslRulePath.ps1
- Public\Test-IntuneWin32Rule.ps1
- LICENSE
- Private\Get-IslFilterDeviceFact.ps1
- PSScriptAnalyzer\IntuneScriptLab.Rules.psm1
- Private\Rules\Find-IslArchitectureIssue.ps1
- README.md
- Private\Get-IslFilterProperty.ps1
- Public\Assert-IntuneResult.ps1
- Private\Rules\Find-IslArm64Assumption.ps1
- en-US\about_IntuneScriptLab.help.txt
- Private\Get-IslHostPath.ps1
- Public\Compare-IntuneDeployedScript.ps1
- Private\Rules\Find-IslContextIssue.ps1
- en-US\IntuneScriptLab-Help.xml
- Private\Get-IslInboxModule.ps1
- Public\Export-IntuneAgentDiagnostic.ps1
- Private\Rules\Find-IslEncodingIssue.ps1
- Examples\intune-script-gate.yml
- Private\Get-IslIntuneOutput.ps1
- Public\Export-IntuneFindingSarif.ps1
- Private\Rules\Find-IslExecutionPolicyCall.ps1
- Examples\IntuneScriptLab.settings.psd1
- Private\Get-IslLogonSession.ps1
- Public\Get-IntuneAgentLog.ps1
- Private\Rules\Find-IslExitCodeIssue.ps1
- Examples\IntuneScripts.Tests.ps1.template
- Private\Get-IslMsiProduct.ps1
- Public\Get-IntuneAgentTimeline.ps1
- Private\Rules\Find-IslInteractiveCall.ps1
- Examples\Invoke-IntuneScriptGate.ps1
- Private\Get-IslOemEncoding.ps1
- Public\Get-IntuneAnalyzerRulePath.ps1
- Private\Rules\Find-IslLongSleep.ps1
- Private\Compare-IslRequirementOutput.ps1
- Private\Get-IslQueryUserOutput.ps1
- Public\Get-IntuneScriptHealth.ps1
- Private\Rules\Find-IslModuleDependency.ps1
- Private\Compare-IslRuleValue.ps1
- Private\Get-IslScriptContext.ps1
- Public\Invoke-IntuneDetectionTest.ps1
- Private\Rules\Find-IslOutputIssue.ps1
- Private\ConvertFrom-IslCmTraceLog.ps1
- Private\Get-IslSetting.ps1
- Public\Invoke-IntunePlatformScriptTest.ps1
- Private\Rules\Find-IslPowerShell7Syntax.ps1
- Private\ConvertFrom-IslFilterRule.ps1
- Private\Get-IslSuppression.ps1
- Public\Invoke-IntuneRemediationTest.ps1
- Private\Rules\Find-IslRebootCommand.ps1
- Private\ConvertFrom-IslRuleSpec.ps1
- Private\Get-IslWindowsReleaseBuild.ps1
- Public\Invoke-IntuneRequirementTest.ps1
- Private\Rules\Find-IslRelativePath.ps1
- Private\ConvertTo-IslCmTraceTime.ps1
- Private\Grant-IslFolderAccess.ps1
- Public\Invoke-IntuneWin32AppTest.ps1
- Private\Rules\Find-IslScriptSize.ps1
- Private\Find-IslAstNode.ps1
- Private\Invoke-IslGraphRequest.ps1
- Public\Repair-IntuneScript.ps1
- Private\Rules\Find-IslSignatureIssue.ps1