Practical PowerShell scripts for Microsoft 365, Microsoft Entra ID, Intune, Exchange Online, SharePoint Online, and Microsoft Graph administration.
These scripts are focused on real-world admin tasks such as tenant reporting, license cleanup, stale account review, endpoint visibility, access governance, and operational validation.
- Microsoft Entra ID reporting
- Microsoft 365 license review and cleanup
- Intune device and compliance visibility
- Conditional Access review
- Microsoft 365 group governance
- SharePoint and Teams operational cleanup
- Microsoft Graph PowerShell automation
| Script | Description |
|---|---|
Export-EntraUserSignInLicenseReport.ps1 |
Exports Entra user details, assigned licenses, and sign-in activity to CSV using Microsoft Graph PowerShell. |
Run the Entra user sign-in and license report:
.\entra-id\Export-EntraUserSignInLicenseReport.ps1Include manager information:
.\entra-id\Export-EntraUserSignInLicenseReport.ps1 -IncludeManagerSpecify a custom output path:
.\entra-id\Export-EntraUserSignInLicenseReport.ps1 -OutputPath ".\reports\EntraUserSignInLicenseReport.csv"| Document | Description |
|---|---|
| Microsoft Graph Sign-In Activity Notes | Notes on sign-in activity fields, reporting caveats, and safe cleanup decisions. |
Most scripts require the Microsoft Graph PowerShell module.
Install-Module Microsoft.Graph -Scope CurrentUserSpecific permissions are listed in each script header.
These scripts are intended as practical examples and starting points. Review the code, validate required permissions, and test in a safe environment before using in production.
Some Microsoft Graph properties may have licensing, permission, retention, or data availability limitations. Always validate output before making cleanup, licensing, or access decisions.
These scripts are provided as-is with no warranty. Use at your own risk.