• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1287
  • 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
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

 
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

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

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