PowerShell script to generate comprehensive device compliance reports from Microsoft Intune via Microsoft Graph API. Exports CSV and interactive HTML dashboard.
Security and compliance teams need regular visibility into device compliance status for ISO 27001 audits, management reporting, and identifying non-compliant devices that pose security risks.
- Full compliance report for all or filtered devices
- Exports compliant and non-compliant devices to separate CSV files
- Generates interactive HTML dashboard with compliance rate
- Shows days since last sync per device
- Encryption status per device
- Auto-installs required Microsoft Graph modules
- PowerShell 5.1 or later
- Microsoft Graph PowerShell module (auto-installed)
- Intune Administrator or Global Reader role
# Full report for all devices
.\Get-IntuneComplianceReport.ps1
# Windows devices only
.\Get-IntuneComplianceReport.ps1 -DeviceOS Windows
# Custom output path
.\Get-IntuneComplianceReport.ps1 -OutputPath "C:\Reports\Weekly"ComplianceReport.csv— all devices with compliance statusNonCompliantDevices.csv— non-compliant devices onlyComplianceReport.html— interactive dashboard with summary cards
- Weekly compliance reporting to management
- ISO 27001 audit evidence
- Identifying devices not synced in 30+ days
- Pre-audit security posture review
Hamza Ali — IT Cybersecurity Engineer | Dubai, UAE