All scripts
Microsoft 365 510

Get-IntuneAppDeploymentStatusReport

Reports install status for a given Intune app deployment across all assigned devices, broken down by success, failure and pending, so a bad app push is caught same day.

Get-IntuneAppDeploymentStatusReport.ps1
<#
.SYNOPSIS
    Reports install status for an Intune app deployment.

.DESCRIPTION
    Pulls device install states for a given mobile app and summarizes
    them by status, so a bad app push is caught the same day it goes out
    instead of during a monthly compliance review.

.PARAMETER AppId
    The Intune mobile app ID to check.

.EXAMPLE
    .\Get-IntuneAppDeploymentStatusReport.ps1 -AppId 00000000-0000-0000-0000-000000000000

.NOTES
    Requires Microsoft.Graph.DeviceManagement with an active
    Connect-MgGraph session.

.AUTHOR
    Shehryar Hassan
#>

param(
    [Parameter(Mandatory)]
    [string]$AppId
)

$statuses = Get-MgDeviceAppManagementMobileAppInstallSummary -MobileAppId $AppId

Write-Host "Install Summary for app $AppId" -ForegroundColor Cyan
[pscustomobject]@{
    Installed   = $statuses.InstalledDeviceCount
    Failed      = $statuses.FailedDeviceCount
    Pending     = $statuses.PendingInstallDeviceCount
    NotApplicable = $statuses.NotApplicableDeviceCount
} | Format-List

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