Applies to: Exchange Server 2010 SP3, Exchange Server 2010 SP2

Topic Last Modified: 2011-03-19

The Get-LogonStatistics cmdlet retrieves logon information so you can view users or services currently connecting to your Microsoft Exchange Server 2010 servers. Logon statistics include information such as user name, logon time, last access time, and client version.

When you run the cmdlet from a Mailbox server, you don't have to use any parameters. In this case, the cmdlet returns the logon statistics for all mailboxes on all databases on the local server.

Note:
Users who log on to their mailboxes using Microsoft Office Outlook Web App aren't connected continuously to the Mailbox server. An Outlook Web App client connects to the server, performs tasks, and then disconnects from the server. Therefore, you may see few or no logon statistics for Outlook Web App, even if users are logged on to the client.

Because the Get-LogonStatistics cmdlet provides a quick snapshot of the connections to Exchange at one specific time, you may want to create a script that runs in Windows Task Scheduler to capture additional data, so you can analyze server and database usage over a specified period of time.

Note:
Running the Get-LogonStatistics cmdlet too often may significantly affect the CPU load on the Client Access server.

For more information, see the following topics:

Looking for other management tasks related to user mailboxes? Check out Managing User Mailboxes.

Use the Shell to view logon statistics

You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Recipient Provisioning Permissions" section in the Mailbox Permissions topic.

Note:
You can't use the EMC to view logon statistics.

This example returns logon statistics for all users connected to the server MBXSVR01.

Copy Code
Get-LogonStatistics -Server MBXSVR01

This example returns logon statistics for a specific user with the SMTP address tony@contoso.com.

Copy Code
Get-LogonStatistics -Identity tony@contoso.com

This example returns logon statistics for all users who reside on the mailbox database MDB01.

Copy Code
Get-LogonStatistics -Database MDB01

This example returns all logon statistics for all processes and mailboxes currently logged on and groups the statistics by the session ID.

Copy Code
Get-LogonStatistics | Group SessionId

For detailed syntax and parameter information, see Get-LogonStatistics.

Logon Statistics Output

By default, the Get-LogonStatistics cmdlet returns the UserName, ServerName, LogonTime, and LastAccessTime values for each user or process that has logon statistics. The following table lists the information returned if you pipeline the output of the Get-LogonStatistics cmdlet to the Format-List cmdlet.

Logon statistics output

Value Description

AdapterSpeed

This value is always blank.

ApplicationId

This value specifies the type of client application making the connection.

ClientIPAddress

If provided by the client application, this value specifies the IP address of the client computer from which the user or service is accessing Exchange.

ClientMode

This value is always ExchangeServer, because the client application connects through the Microsoft Exchange RPC Client Access service or some other Exchange service.

ClientName

This value specifies the name of the Exchange server initiating the connection.

ClientVersion

This value specifies the version of the client application accessing Exchange.

CodePage

This value specifies the code page that the client application is using to log on. For more information, see Code Pages.

CurrentOpenAttachments

This value specifies how many open attachments there were when the Get-LogonStatistics cmdlet was run.

CurrentOpenFolders

This value specifies how many open folders there were when the Get-LogonStatistics cmdlet was run.

CurrentOpenMessages

This value specifies how many open messages there were when the Get-LogonStatistics cmdlet was run.

DatabaseName

This value specifies the name of the mailbox database in which the mailbox resides.

FolderOperationCount

This value is always 0.

FullMailboxDirectoryName

This value specifies the full name of the mailbox directory.

FullUserDirectoryName

This value specifies the full user directory name of the account to which this mailbox belongs.

HostAddress

If provided by the client application, this value specifies the IP address of the host server from which the user or service is accessing Exchange.

Identity

This value specifies the distinguished name of the mailbox or service connecting to Exchange.

IsValid

This value specifies whether the command was valid.

LastAccessTime

This value specifies the last time an action was performed using that logon.

Latency

This value is always 0.

LocaleID

This value specifies the language locale of the mailbox.

LogonTime

This value specifies the time and date at which the user or service created the specific logon.

MACAddress

If provided by the client application, this value specifies the MAC address of the network node from which the user or service logged on to Exchange.

MapiIdentity

This value specifies the distinguished name of the mailbox or service connecting to Exchange.

MessagingOperationCount

This value is always 0.

OriginatingServer

This value specifies the fully qualified domain name (FQDN) of the server.

ProgressOperationCount

This value is always 0.

RPCCallsSucceeded

This value is always 0.

ServerName

This value specifies the name of the server on which the mailbox resides.

SessionID

This value specifies the unique identity of the session used to identify logons that come from the same session.

StreamOperationCount

This value is always 0.

TableOperationCount

This value is always 0.

TotalOperationCount

This value is always 0.

TransferOperationCount

This value is always 0.

UserName

This value specifies the user name of the mailbox.

Windows2000Account

This value specifies the user name of the account accessing the mailbox. For example, if the mailbox user shared a calendar with other users, this value specifies the name of the users who logged on to view the calendar.