Link to home
Start Free TrialLog in
Avatar of nav2567
nav2567Flag for United States of America

asked on

Collect mailbox statistics issue.

I need to collect the below info in my Exchange 2010 server: firstname, lastname, loginname/UPN, itemcount, totalitemsize, storagelimitstatus, databasename, mailbox server.  I have tried this command but not able to make it to work:

get-mailboxstatistics -server myexchangeserver | sort-object totalitemsize -descending | ft firstname,lastname,.......

Please advise.  

Thanks,
SOLUTION
Avatar of Vasil Michev (MVP)
Vasil Michev (MVP)
Flag of Bulgaria image

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 nav2567

ASKER

I just tried the below but it still doesnt work.  

get-mailboxstatistics -server myexchangeserver | sort-object totalitemsize -descending | select @{n="UPN";e={(Get-Mailbox $_.MailboxGuid.Guid).UserPrincipalName}},ItemCount,TotalItemSize | sort TotalItemSize
Well, check what the relevant properties are on-prem, I run this example against O365. I think the MailboxGuid wasnt available as output on-prem, so you might have to replace it with Guid or Identity or similar. What's the output of get-mailboxstatistics for a single user?
ASKER CERTIFIED SOLUTION
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 nav2567

ASKER

The command seems to works.  Thanks.  But I see errors - see attached.

Please advise again.
mbstaterr.png
Hi,
That warning is due to user is not logged on to the  mailbox.
You can ignore that.

Thanks
MAS
I believe this can be closed as per the comment (ID:41772849)  from the author.

Thanks
MAS