Kaffeeundcode
Script Library
PowerShell 11.12.2025

Script Workspace

Get IntuneServiceHealth

Review the purpose, inspect the code, then test it safely in your own tenant.

57_Get-IntuneServiceHealth.ps1

<#
.SYNOPSIS
    Checks Intune Service Health (via Tenant Status).
    
.DESCRIPTION
    Requires 'DeviceManagementServiceConfig.Read.All' permission.

.NOTES
    File Name: 57_Get-IntuneServiceHealth.ps1
    Author: Mattia Cirillo
    Version: 1.0
#>

param()

Connect-MgGraph -Scopes "DeviceManagementServiceConfig.Read.All"

# Gets high level tenant status
$Status = Get-MgDeviceManagement -Property "subscriptionState"

if ($Status) {
    Write-Host "Tenant Subscription State: $($Status.SubscriptionState)" -ForegroundColor Green
}