Skip to content

Check mailbox creation date in Exchange Server

How to check mailbox creation date in Exchange Server? Sometimes we are being asked to check when a mailbox is created. We can check the creation date in Active Directory or in PowerShell. We are going to have a look at both ways. In this article, you are going to learn how to check mailbox creation date in Active Directory and PowerShell.

Check mailbox creation date Active Directory

How to check the mailbox creation date in Active Directory? First, start Active Directory Users and Computers (ADUC). Click on the menu item View. Make sure that Advanced Features is checked.

Search for the user in ADUC. Right-click on the user and click Properties. If you want, you can double-click the user.

Check mailbox creation date in Exchange Server User Properties

Click the Attribute Editor tab. Find the Attribute msExchWhenMailboxCreated.

Check mailbox creation date in Exchange Server Attribute

Have a look at the mailbox creation date value. The value is 20200530191837. That’s the date 2020/05/30 and time 19:18:37.

ADUC is great to check for a single mailbox. If we like to have a list of the mailbox creation date, it’s better to use PowerShell. In the next part, we are going to use PowerShell.

Check mailbox creation date PowerShell

We can find the mailbox creation dates in Exchange Server with PowerShell. With PowerShell, we can search and filter. It will give us a better result. Let’s see it in action.

All mailboxes in the organization

First, we are going to get a list of all the mailbox creation date in the organization. Run Exchange Management Shell as administrator and run the cmdlet.

[PS] C:\>Get-Mailbox -ResultSize Unlimited | Select-Object Name,WhenMailboxCreated,PrimarySmtpAddress

Name                                                          WhenMailboxCreated    PrimarySmtpAddress
----                                                          ------------------    ------------------
Administrator                                                 4/6/2020 9:29:39 AM   Administrator@exoip.com
Ali Tajran                                                    5/13/2020 1:10:39 AM  Ali.Tajran@exoip.com
Amanda Morgan                                                 4/28/2020 2:49:29 PM  Amanda.Morgan@exoip.com
Benetiz Anees                                                 5/5/2020 9:04:29 PM   Benetiz.Anees@exoip.com
Boris Campbell                                                5/20/2020 5:20:06 PM  Boris.Campbell@exoip.com
Christopher Payne                                             4/28/2020 2:49:29 PM  Christopher.Payne@exoip.com
DiscoverySearchMailbox {D919BA05-46A6-415f-80AD-7E09334BB852} 5/11/2020 10:31:24 PM MsExchDiscoveryMailboxD919BA05-46A6-415f-80AD-7E09334BB852@exoip.com
Elizabeth Roberts                                             5/20/2020 5:31:07 PM  Elizabeth.Roberts@exoip.com
Jeff Allan                                                    5/30/2020 9:18:37 PM  Jeff.Allan@exoip.com
Kylie Davidson                                                5/20/2020 5:31:37 PM  Kylie.Davidson@exoip.com

Check one mailbox only

We can check for one mailbox instead of all the mailboxes in the organization. We are going to make use of the -Identity parameter. Add the Display Name or Email Address of the user that you like to check the mailbox creation date of.

[PS] C:\>Get-Mailbox -Identity "Jeff Allan" | Select-Object Name,WhenMailboxCreated,PrimarySmtpAddress

Name       WhenMailboxCreated   PrimarySmtpAddress
----       ------------------   ------------------
Jeff Allan 5/30/2020 9:18:37 PM Jeff.Allan@exoip.com

Again, but this time the email address of the user.

[PS] C:\>Get-Mailbox -Identity "jeff.allan@exoip.com" | Select-Object Name,WhenMailboxCreated,PrimarySmtpAddress

Name       WhenMailboxCreated   PrimarySmtpAddress
----       ------------------   ------------------
Jeff Allan 5/30/2020 9:18:37 PM Jeff.Allan@exoip.com

Filter mailbox creation date

What if you are being asked to check mailbox creation date for the last couple of weeks? We are going to check for the last 14 days.

[PS] C:\>Get-Mailbox -ResultSize Unlimited | Where-Object {$_.WhenMailboxCreated -gt (Get-Date).AddDays(-14)} | ft Name,whenMailboxCreated,PrimarySmtpAddress -Autosize

Name              WhenMailboxCreated   PrimarySmtpAddress
----              ------------------   ------------------
Boris Campbell    5/20/2020 5:20:06 PM Boris.Campbell@exoip.com
Elizabeth Roberts 5/20/2020 5:31:07 PM Elizabeth.Roberts@exoip.com
Jeff Allan        5/30/2020 9:18:37 PM Jeff.Allan@exoip.com
Kylie Davidson    5/20/2020 5:31:37 PM Kylie.Davidson@exoip.com

We want to add more items to the table. For example, we like to know the message copy for sent status and if it’s hidden from the address list.

List all the properties on the object returned from Get-Mailbox. Run the cmdlet.

[PS] C:\>Get-Mailbox | Get-Member

After running the above cmdlet, we can see the property names. The property names that we need are MessageCopyForSentAsEnabled and HiddenFromAddressListsEnabled. Add it to the cmdlet and run it.

[PS] C:\>Get-Mailbox -ResultSize Unlimited | Where-Object {$_.WhenMailboxCreated -gt (Get-Date).AddDays(-14)} | ft Name,whenMailboxCreated,PrimarySmtpAddress,MessageCopyForSentAsEnabled,HiddenFromAddressListsEnabled -Autosize

Name              WhenMailboxCreated   PrimarySmtpAddress          MessageCopyForSentAsEnabled HiddenFromAddressListsEnabled
----              ------------------   ------------------          --------------------------- -----------------------------
Boris Campbell    5/20/2020 5:20:06 PM Boris.Campbell@exoip.com                          False                         False
Elizabeth Roberts 5/20/2020 5:31:07 PM Elizabeth.Roberts@exoip.com                       False                         False
Jeff Allan        5/30/2020 9:18:37 PM Jeff.Allan@exoip.com                              False                         False
Kylie Davidson    5/20/2020 5:31:37 PM Kylie.Davidson@exoip.com                          False                         False

Export mailbox creation date to file

Now that we have the information, let’s export the output to a text file.

[PS] C:\>Get-Mailbox -ResultSize Unlimited | Where-Object {$_.WhenMailboxCreated -gt (Get-Date).AddDays(-14)} | ft Name,whenMailboxCreated,PrimarySmtpAddress,MessageCopyForSentAsEnabled,HiddenFromAddressListsEnabled -Autosize | Out-File "C:\mailbox_created_14_days.txt" -Encoding UTF8

Go to the C: drive and open the text file.

Check mailbox creation date in Exchange Server export txt

We can export the output to CSV.

[PS] C:\>Get-Mailbox -ResultSize Unlimited | Where-Object {$_.WhenMailboxCreated -gt (Get-Date).AddDays(-14)} | Select-Object Name,whenMailboxCreated,PrimarySmtpAddress,MessageCopyForSentAsEnabled,HiddenFromAddressListsEnabled | Export-Csv "C:\mailbox_created_14_days.csv" -NoTypeInformation -Encoding UTF8

Go to the C: drive and open the CSV with your favorite viewer. We are going to use Microsoft Excel.

Check mailbox creation date in Exchange Server export CSV

Looks great. We can sort on name or on mailbox created date in Microsoft Excel.

Now that we explained how to check mailbox creation in PowerShell and Active Directory, did it help you?

Conclusion

In this article, you learned how to check mailbox creation date in Exchange Server. First, we checked the mailbox creation date in Active Directory. After that, we checked the mailbox creation date with PowerShell. As of last, we exported the results to text and CSV file. You have more options with PowerShell than with Active Directory.

If you liked this article, you may also like to read Remove Let’s Encrypt certificate in Windows Server. You can also find us on Twitter and LinkedIn to stay up to date with the latest articles.

ALI TAJRAN

ALI TAJRAN

ALI TAJRAN is a passionate IT Architect, IT Consultant, and Microsoft Certified Trainer. He started Information Technology at a very young age, and his goal is to teach and inspire others. Read more »

This Post Has One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *