List Inactive Mailboxes on Exchange 2007/2010/2013.

Objective:

The script to get list of inactive mailboxes. Inactive is very relative term. For Example, some organizations mark the mailbox as inactive, if it is not accessed for a long time. Other organizations mark the mailbox as inactive, if the user did not sent email for a long period. If you ask me, why they should go by sent item. Some of the reasons could be, the mailboxes are scanned by AV/management tool that changes logon date. So they cannot go by access date. The script identify the inactive mailboxes based on Sent Items.

 

Features:

 

-       The script includes the function to help the users to run the friendly command: Get-InActiveMailbox.

- It can be used with Server,IdleDays,FilePath,Database,EmailID,HUBServer parameters.

- IdleDays Parameter is mandatory and with the range 1 – 5000.

- FilePath,Database,EmailID,HUBServer and Server parameters are optional.

- If the FilePath is not given, the output will be stored in current folder. If the Server is not used, it will run against all the mailboxes.

- You cannot use Server and Database parameters together.

- If you wish to have the output file sent thru email. You can use EmailID parameter. The EmailID should be used with HUBServer parameter.

- You cannot use administrator email ID or credential to send email. When you use other user's email id to send message, You should have at least "Send As" permission.

- If the email option used, you will be prompted with credential. Only after successful authentication, the email will be sent.

- Script does not make any modification, apart from running Get-Mailbox and Get-MailboxFolderStatistics commands.

- The output will be stored to the file with the name < IdleDays > DayInactiveMailbox.csv.

 

You can download the script from ,

https://gallery.technet.microsoft.com/scriptcenter/List-Inactive-Mailboxes-on-1ac82ddf

 

Sample Screen-Shots:

Note : The output may include system mailboxes. If you wish to process further with output, make sure you do not distrub/disable/delete system mailboxes.Refer https://technet.microsoft.com/en-us/library/gg588318(v=exchg.141).aspx for more details.