Solved

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

Posted on 2012-03-28
4
695 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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
This article explains how to install and use the NTBackup utility that comes with Windows Server.
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

808 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