v4.0: Convert to PowerShell module with new features#120
Merged
Conversation
- Replace 6 hardcoded graph.microsoft.com URLs with $script:GraphEndpoint in Get-AssignmentFailures to fix USGov/USGovDoD tenant support - Add try/catch error handling to Get-GroupMemberships matching the pattern from Get-TransitiveGroupMembership - Remove ghost .PARAMETER ShowAdminTemplates from comment-based help - Add missing v3.10.0 release notes entry Fixes #115
…s API (#117) - Remove Administrative Templates (groupPolicyConfigurations) from all 9 feature areas -- migrated policies already appear under Settings Catalog via configurationPolicies - Remove AdminTemplates from html-export.ps1 chart and categories - Migrate deviceConfigurations deviceStatuses endpoint (removed May 2024) to POST-based getConfigurationPolicyDevicesReport reporting API - Update totalCategories counter from 17 to 16 Fixes #117
- Add Option 12: Simulate Group Membership Impact (what-if add to group) - Add Option 14: Simulate Removing User from Group (what-if remove) - Add Option 15: Search Policy Assignments (reverse lookup by name) - Add terminal-width-aware separators via Get-Separator helper - Add UPN format validation before network calls - Normalize y/n prompts to accept Y/y/Yes/yes - Add Autopilot Deployment Profiles and ESP Profiles to simulation - Add ScopeTagFilter support to simulation options - Add dedicated -SimulateTargetGroup and -SimulateRemoveTargetGroup params - Remove deprecated groupPolicyConfigurations policy type - Fix hardcoded Graph URLs to use dynamic GraphEndpoint variable - Bump version to 4.0.0
Convert the 11K-line monolith script into a proper PowerShell module publishable to PSGallery via Install-Module. Module structure: - 18 exported cmdlets (Public/) for all features - 30 private helper functions (Private/) - Pre-cached SettingDefinitions.json (17,785 definitions) - IntuneAssignmentChecker alias for interactive mode New features: - Search-IntuneSetting: search for specific settings across all Settings Catalog and Endpoint Security policies with configured values - Update-IntuneSettingDefinition: refresh the settings catalog from Graph - All options available as standalone cmdlets (e.g., Get-IntuneUserAssignment) - PSGallery version check (replaces GitHub self-update) Architecture: - Module manifest (.psd1) with proper metadata and dependencies - Module loader (.psm1) dot-sources Public/ and Private/ functions - Module-scoped variables for shared state (GraphEndpoint, etc.) - html-export.ps1 bundled locally (no more GitHub download)
PSScriptAnalyzer ResultsFound 0 error(s) and 9 warning(s). See the workflow run for details. |
- Add publish-module.yml: uses Publish-Module instead of Publish-Script, validates module loads before publishing - Update psscriptanalyzer.yml: scan Module/ directory recursively instead of single script file - Old publish-script.yml kept for reference (can be removed after v4.0 ships)
- Add abbreviation map for common Intune terms (PSSO -> Platform SSO, WHFB -> Windows Hello for Business, LAPS, ASR, EDR, etc.) - Add normalized matching (strips spaces/separators for fuzzy ID matching) - Search now matches against both original keyword and expanded form - Default to showing only configured settings (-ShowAll for everything) - Widen policy name column to 80 chars to avoid truncation - Fix progress line overwrite artifact on shorter policy names
Windows app types without the literal 'windows' substring in their @odata.type (win32LobApp, winGetApp, microsoftStoreForBusinessApp, officeSuiteApp) fell through to 'Multi-Platform' in the HTML report. Adds explicit mappings and returns 'Web App' for webApp. Closes #121
Closed
- Move legacy IntuneAssignmentChecker.ps1 and html-export.ps1 to old/v3/ to match existing old/v1, old/v2 pattern and prevent users from running the outdated monolith after switching to the module. - Delete publish-script.yml workflow (replaced by publish-module.yml; the old workflow would fail on release since Publish-Script cannot republish a path-moved script). - Correct release notes menu option numbers (13/14/15 were misnumbered as 14/15/16) and mention the app platform detection fix.
- Replace .\IntuneAssignmentChecker.ps1 CLI examples with cmdlet usage (Get-IntuneUserAssignment, Connect-IntuneAssignmentChecker, etc.). - Update parameter reference table to list the 18 exported cmdlets and their common parameters instead of old script switches. - Document the four new v4.0 menu options (12-15): group simulations, policy search, and setting search. - Fix System Options section: [T] Switch Tenant, [0] Exit, [98]/[99]. - Update Azure Automation runbook example to use Connect-* and New-* flow. - Add migration note for users upgrading from the v3.x Install-Script. - Remove the legacy 'Download and run the script' manual install path; replace with a local clone + Import-Module example.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Major release that converts the 11K-line monolith script into a proper PowerShell module and adds several new features.
Module conversion
Get-IntuneUserAssignment,Search-IntuneSetting)IntuneAssignmentCheckeralias launches the familiar interactive menuInstall-Module IntuneAssignmentChecker(replacesInstall-Script)New features
UI/UX improvements
Bug fixes and cleanup
Test plan
Import-Module ./Module/IntuneAssignmentChecker -Forceloads without errorsGet-Command -Module IntuneAssignmentCheckershows 18 commandsIntuneAssignmentChecker(alias) launches interactive menuUpdate-IntuneSettingDefinitionrefreshes the JSON catalog