This simple CMDLET will show you which database the users mailbox is in.
Get-mailbox -identity username | fl database
The result will look like this:
Database : Mailbox Database 1809052085
Last reviewed on April 22, 2021 9 Comments
This simple CMDLET will show you which database the users mailbox is in.
Get-mailbox -identity username | fl database
The result will look like this:
Database : Mailbox Database 1809052085
A Microsoft Outlook Most Valuable Professional (MVP) since 1999, Diane is the author of several books, including Outlook 2013 Absolute Beginners Book. She also created video training CDs and online training classes for Microsoft Outlook. You can find her helping people online in Outlook Forums as well as in the Microsoft Answers and TechNet forums.
Home | Outlook User | Exchange Administrator | Office 365 | Outlook.com | Outlook Developer
Outlook for Mac | Common Problems | Utilities & Addins | Tutorials
Outlook & iCloud Issues |
Outlook Apps
EMO Archives | About Slipstick | Slipstick Forums
Submit New or Updated Outlook and Exchange Server Utilities
Send comments using our Feedback page
Copyright © 2024 Slipstick Systems. All rights reserved.
Slipstick Systems is not affiliated with Microsoft Corporation.
Sign up for Exchange Messaging Outlook
Our weekly Outlook & Exchange newsletter (bi-weekly during the summer)
Please note: If you subscribed to Exchange Messaging Outlook before August 2019, please re-subscribe.
How to find the database for multiple users in a single command like atleast 4 users using any switch
Do you want for specific users or all users?
If you want specific users, you'll need to use a csv list of users and a for each statement.
If you want users in a filterable group, you can use something like this:
Get-mailbox -Filter {RecipientTypeDetails -eq "UserMailbox"} | Get-MailboxStatistics | select DisplayName,database
Can you provide an example of the CSV list and foreach statement?
How about for all users?
For a quick list, use Get-Mailbox -ResultSize unlimited
This result is
Name Alias Database ProhibitSendQuota ExternalDirectoryObjectId
---- ----- -------- ----------------- -------------------------
abc abc NAMPR05DG153-db112 99 GB (106,300,44... 158b841f-da8d-4193-81b...
This Get-Mailbox | Sort database, name | Format-Table name, database will get you a simpler list with just the name and database.
Nice command, thanks Diane!
DOUBLE THUMBS UP! Many thanks.
Thanks alot! This was very helpful.
NICE ONE! You helped me alot with this article! WOW!!!!