Link to home
Start Free TrialLog in
Avatar of Andy Andy
Andy AndyFlag for India

asked on

mailbox database size and mailbox count user

Hello Team,

Can anybosy tell the powershell command to check all mailbox database size and mailbox count per database in single command.

Any help will be appreciated

Thanks
Avatar of Mohammed Tahir
Mohammed Tahir
Flag of India image

ASKER CERTIFIED SOLUTION
Avatar of Krishna Patil
Krishna Patil

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Andy Andy

ASKER

Will check nd confirm you
hello Krishna,

It give me only below result. I still didnt get the how mailbox reside in that databases.
in below Freespace and Size only comes not the number of users..

Name         Free Space Size NumberofUsers
----         ---------- ---- -------------
BCCMBDB00          1354 2312
BCCMBDB10           973 1800
QUUARCDB04          836  904
BCCARCDB10          678  776
BCCARCDB12          122  184
BCCARCDB14          721  776
BCCARCDB16          509  776
BCCARCDB18          762  904
BCCARCDB00          939 1032
BCCARCDB02          817  904
QUUARCDB02          830  904
BCCARCDB04          755  904
BCCARCDB08          770  904
BCCARCDB06          833  904


Please tell how to complete this
Avatar of Krishna Patil
Krishna Patil

Its giving me result in following format, Please copy the script, that I shared correctly and no need to paste this in .ps1 file and then execute.


Name                        Free Space Size NumberofUsers
----                        ---------- ---- -------------
Mailbox Database 0461156407         30  247            12
Mailbox Database 0488204167         82  384             2
It still gives me Same result. Please suggest
What is your exchange version? Service pack level?
Exchange 2010 sp3 with rollup 2
For same version, I am getting correct result.

YOu can try following script. I just added specific DB, add just any DB name

Get-MailboxDatabase  -identity DBNAME -Status | select Name,@{Label="Free Space";Expression={$_.AvailableNewMailboxSpace.ToMB()}},@{Label="Size";Expression={$_.DatabaseSize.ToMB()}},@{Name="NumberofUsers";Expression={(Get-Mailbox -resultsize unlimited -Database $_.name).Count}} | ft -auto
Good