PowerShell Gallery CI License: MIT
Community PowerShell module for the Inforcer API. Connect, query tenants, baselines, policies, alignment scores, and audit events with consistent parameters and output.
This module was created by Roy Klooster for the community. It is not owned or officially maintained by Inforcer; it is a community project built by a community member to make it easier to work with the Inforcer API from PowerShell.
- Repository: https://github.com/royklo/InforcerCommunity
- PowerShell Gallery: https://www.powershellgallery.com/packages/InforcerCommunity
InforcerCommunity/
├── README.md # This file
├── LICENSE # MIT (community project disclaimer)
├── CONTRIBUTING.md # How to contribute, fork & PR
├── .gitignore
├── .github/
│ ├── ISSUE_TEMPLATE/ # Bug report, feature request
│ ├── PULL_REQUEST_TEMPLATE.md
│ └── workflows/ # build-and-test.yml
├── docs/
│ ├── CMDLET-REFERENCE.md # Parameters and example output
│ └── API-REFERENCE.md # API schemas and response structures
├── CHANGELOG.md # Release history
├── module/ # Script module (see module/README.md)
│ ├── InforcerCommunity.psd1
│ ├── InforcerCommunity.psm1
│ ├── InforcerCommunity.Format.ps1xml
│ ├── InforcerCommunity.Types.ps1xml
│ ├── README.md
│ ├── Public/ # Exported cmdlets (incl. Export-InforcerTenantDocumentation)
│ └── Private/ # Helpers (API, session, aliases, renderers, Graph, etc.)
└── Tests/
└── Consistency.Tests.ps1 # Pester tests
- PowerShell 7.0+ (cross-platform: Windows, macOS, Linux)
- An Inforcer API key (from your Inforcer tenant)
Install-Module -Name InforcerCommunity -Scope CurrentUsergit clone https://github.com/royklo/InforcerCommunity.git
cd InforcerCommunity
Import-Module ./module/InforcerCommunity.psd1 -ForceAlways run Import-Module from the repository root and use ./module/InforcerCommunity.psd1. If you see an error about Inforcer.Format.ps1xml or a path containing Inforcer-Powershell-Module, you are loading the manifest from the wrong directory or an old copy of the repo; switch to the InforcerCommunity repo root and use the path above.
# Connect with your API key
Connect-Inforcer -ApiKey "your-api-key" -Region uk
# List tenants
Get-InforcerTenant
# Get alignment score table
Get-InforcerAlignmentDetails
# Get policies for a tenant
Get-InforcerTenantPolicies -TenantId 482
# Show policy changes (PolicyDiff on each tenant when available)
Get-InforcerTenant | Select-Object ClientTenantId, TenantFriendlyName, PolicyDiff
# Generate tenant documentation as HTML. -OutputPath is what writes the file: omit it and the
# DocModel is returned instead, so you can read the configuration without producing artefacts.
# The report opens in your browser automatically, unless you are on a CI runner or pass -Show:$false.
Export-InforcerTenantDocumentation -Format Html -TenantId 482 -OutputPath ./docs
# Generate documentation for a specific baseline with Graph group name resolution
Connect-Inforcer -ApiKey "your-api-key" -Region uk -FetchGraphData
Export-InforcerTenantDocumentation -Format Html -TenantId 482 -Baseline "Production" -FetchGraphData -OutputPath ./docs
# Disconnect when done
Disconnect-InforcerFor full parameter details and example output, see Cmdlet Reference. For detailed API schemas and response structures, see API Reference.
The Export-InforcerTenantDocumentation cmdlet resolves Intune Settings Catalog settingDefinitionIDs to friendly names using data from the IntuneSettingsCatalogData repository. This data (~65 MB) is automatically downloaded and cached on first use at ~/.inforcercommunity/data/settings.json with a 24-hour TTL.
- No manual setup required — the module handles download, caching, and freshness checks automatically
- Offline support — if the download fails, the module uses a stale cached copy (or proceeds without resolution, showing raw IDs)
- Override — use
-SettingsCatalogPathto point to a localsettings.jsonfile instead
The data is refreshed nightly from Microsoft Graph by a GitHub Actions workflow in the IntuneSettingsCatalogData repo.
We welcome contributions: fork the repo, make your changes, and open a pull request. See CONTRIBUTING.md for the workflow, code style, and how to report bugs.
Found a bug or have a feature idea? Please open an issue:
MIT — This module was created by Roy Klooster for the community. It is not owned or officially maintained by Inforcer; it is a community project built by a community member to make it easier to work with the Inforcer API from PowerShell.
