Skip to content

Get-EXOMobileDeviceStatistics

Exchange Online Management: Gets mobile device statistics for a user mailbox

#Requires -Version 5.1

[CmdletBinding()]
Param(
    [Parameter(Mandatory = $true)]
    [string]$Mailbox,
    [switch]$ActiveSync,
    [switch]$OWAforDevices,
    [switch]$RestApi,
    [switch]$UniversalOutlook
)

Process {
    try {
        [hashtable]$cmdArgs = @{'ErrorAction' = 'Stop'; 'Mailbox' = $Mailbox; 'ActiveSync' = $ActiveSync; 'OWAforDevices' = $OWAforDevices; 'RestApi' = $RestApi; 'UniversalOutlook' = $UniversalOutlook}

        $result = Get-EXOMobileDeviceStatistics @cmdArgs | Select-Object *
        if ($null -eq $result -or $result.Count -eq 0) {
            Write-Output "No mobile device statistics found"
            return
        }
        foreach ($item in $result) {
            $item | Add-Member -NotePropertyName Timestamp -NotePropertyValue (Get-Date -Format "yyyy-MM-dd HH:mm:ss") -PassThru -Force
        }
    }
    catch { throw }
}

Filters results by the user mailbox (GUID, User ID or UPN) associated with the mobile device

Off

Filters results by Exchange ActiveSync devices

Off

Filters results by devices where Outlook on the web for devices is enabled

Off

Filters results by REST API devices

Off

Filters results by Mail and Calendar devices

An interactive directory of PowerShell scripts.