Skip to content

Get-MgmtGraphManagedDeviceOverview

MgmtGraph: Audits Intune managed device overview

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

[CmdletBinding()]
Param ()

Process {
    try {
        $overview = Get-MgDeviceManagementManagedDeviceOverview -ErrorAction Stop
        
        $result = [PSCustomObject]@{
            DeviceCount             = $overview.DeviceCount
            DualEnrolledDeviceCount = $overview.DualEnrolledDeviceCount
            EnrolledDeviceCount     = $overview.EnrolledDeviceCount
            MdmEnrolledDeviceCount  = $overview.MdmEnrolledDeviceCount
            Timestamp               = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
        }

        Write-Output $result
    }
    catch {
        throw
    }
}

This script has no configurable parameters.

An interactive directory of PowerShell scripts.