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

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name M365TenantHygiene

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name M365TenantHygiene

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

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

Core

Dependencies

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

Version History

Version Downloads Last updated
1.0.0 (current version) 7 11/5/2026