Skip to content

Get-MgmtGraphDeviceManagement

MgmtGraph: Audits Intune device management service status

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

[CmdletBinding()]
Param ()

Process {
    try {
        $mgmt = Get-MgDeviceManagement -ErrorAction Stop
        
        $result = [PSCustomObject]@{
            SubscriptionState         = $mgmt.SubscriptionState
            IntuneAccountId           = $mgmt.IntuneAccountId
            Settings                  = $mgmt.Settings
            Id                        = $mgmt.Id
            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.