Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 985
  • Last Modified:

Exchange 2010 List all Mailboxes by last access date

Hello,  I need to run an audit of our Exchange Server and clean up any old accounts.  What's the best way to get a report of all mailboxes sorted by last access date in Exchange 2010?  Thanks for the help
0
sdpads
Asked:
sdpads
2 Solutions
 
biaselectronicsCommented:
Use Powershell and the following command:

Get-MailboxStatistics | Sort LastLogonTime

You can modify it with server name, database and other variables if you wish
0
 
Will SzymkowskiSenior Solution ArchitectCommented:
Added detail to the script...

Get-Mailbox -Resultsize unlimited | get-mailboxstatistics | select DisplayName, Database, LastLogonTime

Open in new window


Will.
0
 
BahloulCommented:
hi sdpads,

if you use A.D Saved queries that would be better see the attached xml file and import it to saved queries in the A.D that will get you all users with 60 days last logon  you can determine the suitable duration and edit the same query, command line in you target not reliable.

the below screen to import the xml file just browse to the file location :-

aduc-import-query-definition.png
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Satya PathakLead Technical ConsultantCommented:
try below and export the inactive mailbox to CSV formate .

http://www.slipstick.com/exchange/cmdlets/create-list-inactive-exchange-mailboxes/
0
 
BahloulCommented:
also for your target you may search first for never logged on users using the following query in saved query  :-

 ff.png
ff.JPG
(&(&(objectCategory=person)(objectClass=user))(|(lastLogon=0)(!(lastLogon=*))))
0
 
sdpadsAuthor Commented:
Thanks Will exactly what I needed.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now