Where are mailbox last logon, client IP address and other details in Exchange 2007 & Exchange 2010?

by Bharat Suneja on July 24, 2008

In Exchange Server 2003/2000, expanding a Mailbox Database (MDB) provides information about mailboxes in a database, last logon/logoff times and account(s) that logged on to mailboxes (see ‘Displaying Client IP Address in Exchange System Manager‘ for details).

Screenshot: Store Logons
Figure 1: In Exchange 2003, the Logons node displays Store logon-related information. Click here to see a bigger screenshot.

In Exchange Server 2007/2010, these details are not displayed in the EMC. The reasons are not hard to guess. These details are retrieved by querying the mailbox database. In Exchange 2003, these are displayed when you select the mailbox database, resulting in a single mailbox database being queried. In Exchange 2007/2010, mailboxes are displayed when you select Recipient Configuration -> Mailboxes, and depending on the selected scope or filter, the console displays mailboxes from the entire organization. Querying all mailbox databases on different servers in a distributed organization can become very slow, generate a lot of extra network traffic— terribly inefficient.

Instead, why not allow the administrator to query for these details when they’re actually required? The shell provides you the flexibility to only get the fields you want, only for the mailboxes you want, making it much more efficient. If you manage smaller Exchange deployments and love your GUI management tools, you may not fall in love with the idea. (But that debate’s already settled, and you’re going to have to learn some bit of Exchange shell to be able to manage Exchange 2007 and later. The good news is, it’s cooler, easy-to-use, well-documented by now, and comes with plenty of help!).

Logon Statistics

The Get-LogonStatistics cmdlet provides the following logon-related information.

AdapterSpeed :
ClientIPAddress :
ClientMode :
ClientName :
ClientVersion :
CodePage :
CurrentOpenAttachments :
CurrentOpenFolders :
CurrentOpenMessages :
FolderOperationCount :
FullMailboxDirectoryName :
FullUserDirectoryName :
HostAddress :
LastAccessTime :
Latency :
LocaleID :
LogonTime :
MACAddress :
MessagingOperationCount :
OtherOperationCount :
ProgressOperationCount :
RPCCallsSucceeded :
StreamOperationCount :
TableOperationCount :
TotalOperationCount :
TransferOperationCount :
UserName :
Windows2000Account :
ServerName :
StorageGroupName :
DatabaseName :
Identity :

The command can be constrained to a mailbox database (Get-LogonStatistics -Database “MyDatabase” | fl), a mailbox server (get-logonstatistics -Server “MyServer”), or a particular mailbox.

Mailbox information

In ESM, the Mailboxes node of a Mailbox Store displays mailbox-related information such as mailbox size, number of items, and last logon/logoff.

Screenshot: Mailboxes node in Exchange 2003 ESM
Figure 2: In Exchange 2003, the Mailboxes node displays mailbox-related information. Click here to see a bigger screenshot.

This information can be retrieved using the Get-MailboxStatistics cmdlet. It provides the following information related to a mailbox:

AssociatedItemCount :
DeletedItemCount :
DisconnectDate :
DisplayName :
ItemCount :
LastLoggedOnUserAccount :
LastLogoffTime :
LastLogonTime :
LegacyDN :
MailboxGuid :
ObjectClass :
StorageLimitStatus :
TotalDeletedItemSize :
TotalItemSize :
Database :
ServerName :
StorageGroupName :
DatabaseName :
Identity :

It can also be constrained to a -Database, -Server, or mailbox.

Now that we’re dealing with the shell, besides these cmdlets’ built-in filtering capabilities (Database, Server, or mailbox), you can use Powershell’s where-object cmdlet to further filter the results based on the properties returned by each cmdlet. For example, to find out logon sessions from a particular IP address:

Get-LogonStatistics -Server “MyServer” | where {$_.ClientIPAddress -like “”}

{ 15 comments… read them below or add one }

Leave a Comment

Previous post:

Next post: