M365TenantHygiene
1.0.0
Read-only Microsoft 365 tenant security hygiene auditing over Microsoft Graph. Checks MFA registration, inactive accounts, privileged role assignments, high-risk application permissions, external mail forwarding rules and Intune device compliance, then renders a self-contained HTML report with CSV exports. Performs no write operations.
Minimum PowerShell version
7.2
Installation Options
Owners
Copyright
(c) 2026 Eduard Arbona. Released under the MIT licence.
Package Details
Author(s)
- Eduard Arbona
Tags
Microsoft365 MicrosoftGraph Security Audit Entra Intune ReadOnly Compliance MFA
Functions
Connect-M365Hygiene Disconnect-M365Hygiene Enable-M365HygienePro Export-M365HygieneReport Get-M365HygieneLicense Get-M365HygieneCheck Invoke-M365HygieneAudit Test-M365HygienePermission
PSEditions
Dependencies
-
- Microsoft.Graph.Authentication (>= 2.0.0)
Release Notes
1.0.0 - First release on the PowerShell Gallery. Six read-only hygiene checks over Microsoft Graph: MFA registration, inactive accounts, privileged role assignments, high-risk application permissions, external mail forwarding rules, and Intune device compliance. Invoke-M365HygieneAudit separates findings from coverage, so a check that could not run reports Skipped with the reason instead of a clean result. Export-M365HygieneReport renders a self-contained HTML report with per-finding evidence and remediation guidance, plus findings and coverage CSVs, with no external assets. The HTTP verb is hardcoded to GET at the single call site and tests/ReadOnly.Tests.ps1 fails the build if that changes, so the module performs no write operations. Full history: https://github.com/earbona23/m365-tenant-hygiene/blob/main/CHANGELOG.md
FileList
- M365TenantHygiene.nuspec
- Checks\Test-HygieneDeviceCompliance.ps1
- Checks\Test-HygieneInactiveAccount.ps1
- Checks\Test-HygieneMailForwarding.ps1
- Checks\Test-HygieneMfaRegistration.ps1
- Checks\Test-HygienePrivilegedRole.ps1
- Checks\Test-HygieneRiskyApplication.ps1
- M365TenantHygiene.psd1
- M365TenantHygiene.psm1
- Private\ConvertTo-HygieneHtmlReport.ps1
- Private\ConvertTo-HygieneSarif.ps1
- Private\Get-HygieneCheckRegistry.ps1
- Private\Get-HygieneReportAsset.ps1
- Private\Invoke-HygieneGraphRequest.ps1
- Private\License.ps1
- Private\New-HygieneAuditContext.ps1
- Private\New-HygieneCheckResult.ps1
- Private\New-HygieneFinding.ps1
- Private\Write-HygieneLog.ps1
- Public\Connect-M365Hygiene.ps1
- Public\Disconnect-M365Hygiene.ps1
- Public\Enable-M365HygienePro.ps1
- Public\Export-M365HygieneReport.ps1
- Public\Get-M365HygieneCheck.ps1
- Public\Get-M365HygieneLicense.ps1
- Public\Invoke-M365HygieneAudit.ps1
- Public\Test-M365HygienePermission.ps1
Version History
| Version | Downloads | Last updated |
|---|---|---|
| 1.0.0 (current version) | 7 | 11/5/2026 |