• 1. London, UK
  • 2. Sydney, Australia
  • 3. New York, NY
  • 4. Melbourne, Australia
  • 5. Paris, France
  • 6. San Francisco, CA
  • 7. Chicago, IL
  • 8. Moscow, Russia
  • 9. Amsterdam, The Netherlands
  • 10. Toronto, Canada

Thursday, July 24, 2008

 

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

Posted by Bharat Suneja at 7:20 AM
In Exchange Server 2003/2000, expanding a Mailbox Database 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, these details are not displayed in the EMC. These can be retrieved easily using the Exchange shell.

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 "192.168.2.101"}

Labels: , , , ,

7 Comments:

July 24, 2008 9:18 AM
Anonymous Anonymous said...

Get-LogonStatistics default display is ugily:

Lots of ... in the output. Does anyone test this stuff? :-)

 
July 24, 2008 8:14 PM
Anonymous Anonymous said...

Another wonderful post - thanks for making it easier!

Daniel Smith

 
July 25, 2008 7:09 AM
Anonymous Anonymous said...

Will this stuff ever be put back in the GUI ?

Most non full time email administrators do not have the time to try and figure out PowerShell..

 
September 3, 2008 1:23 PM
Blogger Lynne said...

I can't seem to SEE all the fields, they're off the side. i'm fidgeting with window size, etc, but is there a way to say, show me fields listed DOWN instead of across?

 
September 3, 2008 1:31 PM
Blogger Bharat Suneja said...

@Lynne:
- To list all fields in a list view instead of the default table view, pipe the output to format-list, for example:
Get-Mailbox "foo" | fl
Get-ReceiveConnector | fl
Get-SendConnector | fl

- To select and view only particular properties of an object, use the Select-Object cmdlet:
Get-Mailbox | Select Name,Databse,*Email*

Get-ReceiveConnector | Select Name,Bindings

- To format tables where information in the rows fits, use the format-table cmdlet with the -AutoSize switch:
Get-Mailbox | ft Name,Database,*Email* -AutoSize

 
September 4, 2008 1:41 PM
Blogger Lynne said...

THANK YOU!!

 
September 29, 2008 11:30 PM
Anonymous ip finding said...

Thanks! I've been looking for this!

 

Post a Comment

Links to this post:

Create a Link

<< Home