Solved

PowerShell-Exchange 2010-Mailbox sze, User name, and Mailbox DB

Posted on 2012-03-28
4
693 Views
Last Modified: 2012-05-04
I have just joined here, and they dont have any mailbox limit, so i am trying to generate a report for all the users (i.e. around 400), to get there username, with there mailbox size and in the database they are associated with, because over here they have couple of different databases in different drives.
So would it possible i can generate a report into a CSV file.

When i open up powershell, if i run a command under c:\windows\system32...it says i dont have permissions? so would it be ok if i run the command just under c:\, make up a folder and generate the report in that folder.

thanks....
0
Comment
Question by:Leo
  • 2
4 Comments
 
LVL 18

Expert Comment

by:suriyaehnop
ID: 37779900
Normally, you can use EMS (Exchange Management Shell). Try below code:

Get-Mailbox -ResultSize Unlimited | Select-Object alias,IssueWarningQuota,Database,@{Name='Size (MB)';expression={$mbx = Get-MailboxStatistics $_.alias; $mbx.totalitemsize.value.toMB() }},@{Name='Storage Limit Status';expression= { $mbx = Get-MailboxStatistics $_.alias; $mbx.StorageLimitStatus }} >c:\status.csv

Open in new window

0
 
LVL 5

Assisted Solution

by:duraswitch
duraswitch earned 500 total points
ID: 37779922
First, make sure you open the Exchange Managment Shell, and not regular Powershell.  if you are a member of the Organizer Management group you shouldn't run into any permissions problems.  As for the command, run this:

get-mailbox -resultsize unlimited |select displayname,database | export-csv c:\mailboxes.csv -NoTypeInformation
0
 
LVL 8

Accepted Solution

by:
Leo earned 0 total points
ID: 37779965
0
 
LVL 8

Author Closing Comment

by:Leo
ID: 37928241
Found the answer as i was typing my response.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
Read this checklist to learn more about the 15 things you should never include in an email signature.
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…
To show how to generate a certificate request in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Servers >> Certificates…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now