Commands › Exchange Online

Get-LogonStatistics

Exchange Online ExchangeOnlineManagement Get-*

This cmdlet is functional only in Exchange Server 2010. The Get-LogonStatistics cmdlet is deprecated and is no longer used.

Quick start script

# Get-LogonStatistics — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Run and inspect
Get-LogonStatistics -Identity <LogonableObjectIdParameter> -Database <DatabaseIdParameter> -Server <ServerIdParameter> | Format-List

# 3. Export for evidence / drift tracking
Get-LogonStatistics | Export-Clixml .\LogonStatistics-$(Get-Date -Format yyyyMMdd).xml

Syntax — 3 parameter sets

Database

Get-LogonStatistics -Database <DatabaseIdParameter>
 [-DomainController <Fqdn>]
 [<CommonParameters>]

Identity

Get-LogonStatistics [-Identity] <LogonableObjectIdParameter>
 [-DomainController <Fqdn>]
 [<CommonParameters>]

Server

Get-LogonStatistics -Server <ServerIdParameter>
 [-DomainController <Fqdn>]
 [<CommonParameters>]

Parameters (4)

ParameterTypeRequiredWhat it controls
-Identity LogonableObjectIdParameter yes The Identity parameter specifies the mailbox to get logon statistics from. You can use one of the following values to identify the mailbox:
-Database DatabaseIdParameter yes The Database parameter specifies the mailbox database to get logon statistics from (all mailboxes in the specified database). You can use any value that uniquely identifies the mailbox database. For example:
-Server ServerIdParameter yes The Server parameter specifies the Mailbox server to get logon statistics from (all mailboxes on all databases, including recovery databases, on the specified server). You can use one of the following values to...
-DomainController Fqdn The DomainController parameter specifies the domain controller that's used by this cmdlet to read data from or write data to Active Directory. You identify the domain controller by its fully qualified domain name...

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.