Reporting on mailbox creation time

If you work in an environment that frequently hires new employees, you may have a process in place to provision your mailboxes in bulk. You may have already used this book to help you do that. Now you might like to be able to generate reports or retrieve a list of mailboxes that were created during a specific time frame or after a specific date. In this recipe, you will learn a couple of ways to do that using the Exchange Management Shell.

How to do it...

Let's start off with a simple example. To generate a report of mailboxes created in the last week, execute the following command:

Get-Mailbox -ResultSize Unlimited | 
  ?{$_.WhenMailboxCreated –ge (Get-Date).AddDays(-7)} | 
 Select DisplayName, WhenMailboxCreated, ...

Get Microsoft Exchange Server 2013 PowerShell Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.