Solved

Exchange 2010 List all Mailboxes by last access date

Posted on 2015-01-05
6
266 Views
Last Modified: 2015-01-08
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
Comment
Question by:sdpads
6 Comments
 
LVL 3

Assisted Solution

by:biaselectronics
biaselectronics earned 150 total points
ID: 40532615
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
 
LVL 53

Accepted Solution

by:
Will Szymkowski earned 350 total points
ID: 40532655
Added detail to the script...

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

Open in new window


Will.
0
 
LVL 3

Expert Comment

by:Bahloul
ID: 40533020
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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
LVL 20

Expert Comment

by:Satya Pathak
ID: 40533090
try below and export the inactive mailbox to CSV formate .

http://www.slipstick.com/exchange/cmdlets/create-list-inactive-exchange-mailboxes/
0
 
LVL 3

Expert Comment

by:Bahloul
ID: 40533200
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
 

Author Closing Comment

by:sdpads
ID: 40539210
Thanks Will exactly what I needed.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Follow this checklist to learn more about the 15 things you should never include in an email signature from personal quotes, animated gifs and out-of-date marketing content.
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
In this video we show how to create an email address policy in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Mail Flow…
how to add IIS SMTP to handle application/Scanner relays into office 365.

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question