Get-LogonStatistics
This cmdlet is functional only in Exchange Server 2010.
The Get-LogonStatistics cmdlet is deprecated and is no longer used.
For information about the parameter sets in the Syntax section below, see Exchange cmdlet syntax.
Syntax
Database
Get-LogonStatistics
-Database <DatabaseIdParameter>
[-DomainController <Fqdn>]
[<CommonParameters>]
Identity
Get-LogonStatistics
[-Identity] <LogonableObjectIdParameter>
[-DomainController <Fqdn>]
[<CommonParameters>]
Server
Get-LogonStatistics
-Server <ServerIdParameter>
[-DomainController <Fqdn>]
[<CommonParameters>]
Description
The Get-LogonStatistics cmdlet retrieves logon information about currently active sessions. On Mailbox servers only, you can use the Get-LogonStatistics cmdlet without parameters. In this case, the cmdlet returns the logon statistics for all mailboxes on all databases on the local server.
Users who log on to their mailboxes using Microsoft Office Outlook Web App aren't continually connected to the Mailbox server. An Outlook Web App client connects to the server, performs tasks, and then disconnects from the server. Therefore, you might see few or no logon statistics for Outlook Web App, even if users are logged on with this client.
You need to be assigned permissions before you can run this cmdlet. Although all parameters for this cmdlet are listed in this topic, you might not have access to some parameters if they aren't included in the permissions assigned to you. To see what permissions you need, see the "Recipient Provisioning Permissions" section in the Mailbox Permissions topic.
Examples
Example 1
Get-LogonStatistics -Server Server01
This example returns logon statistics for all users connected to the server Server01.
Parameters
-Database
Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE
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:
- Name
- Distinguished name (DN)
- GUID
This parameter accepts pipeline input from the Get-MailboxDatabase command.
You can't use this parameter with the Identity or Server parameters.
Parameter properties
Type: | DatabaseIdParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
Database
Position: | Named |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-DomainController
Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE
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 (FQDN). For example, dc01.contoso.com.
Parameter properties
Type: | Fqdn |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Identity
Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online
The Identity parameter specifies the mailbox to get logon statistics from. You can use one of the following values to identify the mailbox:
- GUID
- Distinguished name (DN)
- Domain\Account
- User principal name (UPN)
- Legacy Exchange DN
- SmtpAddress
- Alias
This parameter accepts pipeline input from the Get-Mailbox command.
You can't use this parameter with the Database or Server parameters.
Parameter properties
Type: | LogonableObjectIdParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
Identity
Position: | 1 |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-Server
Applicable: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE
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 identify the server:
- Fully qualified domain name (FQDN)
- NetBIOS name
This parameter accepts pipeline input from the Get-ExchangeServer and Get-MailboxServer commands.
You can't use this parameter with the Database or Identity parameters.
Parameter properties
Type: | ServerIdParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
Server
Position: | Named |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
Input types
To see the input types that this cmdlet accepts, see Cmdlet Input and Output Types. If the Input Type field for a cmdlet is blank, the cmdlet doesn't accept input data.
Outputs
Output types
To see the return types, which are also known as output types, that this cmdlet accepts, see Cmdlet Input and Output Types. If the Output Type field is blank, the cmdlet doesn't return data.