All scripts
Microsoft 365 833

Get-M365ServiceHealth

Reports current Microsoft 365 service health issues and advisories across every workload, with severity and impacted services, so incidents get noticed before the help desk starts filling up.

365healthstatus.ps1
<#
.SYNOPSIS
    Reports current Microsoft 365 service health issues and advisories.

.DESCRIPTION
    Pulls active service health issues and message center advisories
    across every Microsoft 365 workload, so incidents affecting your
    tenant get noticed proactively instead of after the help desk
    queue starts filling up with the same complaint from different
    people.

.EXAMPLE
    .\Get-M365ServiceHealth.ps1

.NOTES
    Requires Microsoft.Graph.Devices.ServiceAnnouncement with an active
    Connect-MgGraph session and ServiceHealth.Read.All scope.

.AUTHOR
    Shehryar Hassan
#>

$issues = Get-MgServiceAnnouncementIssue -Filter "isResolved eq false"

if (-not $issues) {
    Write-Host "No active service health issues reported for this tenant." -ForegroundColor Green
    return
}

$report = $issues | Select-Object Title, Service, Classification, Status, StartDateTime

$report | Sort-Object StartDateTime -Descending | Format-Table -AutoSize
Write-Host "$($issues.Count) active issue(s) found" -ForegroundColor Cyan

Read it before you run it, and test in a safe tenant first.