I need to list the Mailbox size for each user. I tried using Get-MailboxStatistics but error:

The term ‘Get-MailboxStatistics’ is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:22

  • Get-MailboxStatistics <<<< -Database “Mailbox Database SEHOSVSB01” | Select DisplayName, ItemCount, TotalItemSize |
    Sort-Object TotalItemSize -Descending | Export-CSV C:\MBSizes.csv
  • CategoryInfo : ObjectNotFound: (Get-MailboxStatistics:String) , CommandNotFoundException
  • FullyQualifiedErrorId : CommandNotFoundException
4 Spice ups

Are you running it from the Exchange Management Shell? Running that from a powershell prompt won’t work without loading the exchange tools in.

Edit: in case you are trying to script that, there are two methods here: http://stackoverflow.com/questions/6035902/exchange-powershell-how-to-invoke-exchange-2010-module-from-inside-script Were it me, I’d try the one that calls remote exchange.ps1

3 Spice ups

cduff is on the right track, also check to make sure that you have the right permissions to execute the scripts

1 Spice up

Also you can use the process here to get your data into Spiceworks so you can use a Spiceworks report and see it on your dashboard.