Skip to content

Get-MgmtGraphDeviceConfigurationUserStatusOverview

MgmtGraph: Audits user status overview for an Intune configuration profile

#Requires -Version 5.1
#Requires -Modules Microsoft.Graph.DeviceManagement

[CmdletBinding()]
Param (
    [Parameter(Mandatory = $true, Position = 0)]
    [string]$Identity
)

Process {
    try {
        $overview = Get-MgDeviceManagementDeviceConfigurationUserStatusOverview -DeviceConfigurationId $Identity -ErrorAction Stop
        
        $result = [PSCustomObject]@{
            ConfigurationId      = $Identity
            SuccessCount         = $overview.SuccessCount
            NotApplicableCount   = $overview.NotApplicableCount
            PendingCount         = $overview.PendingCount
            ErrorCount           = $overview.ErrorCount
            FailedCount          = $overview.FailedCount
            ConflictCount        = $overview.ConflictCount
            Timestamp            = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
        }

        Write-Output $result
    }
    catch {
        throw
    }
}

Specifies the ID of the device configuration profile.

An interactive directory of PowerShell scripts.