Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Need to get size of a folder inside the Inbox

Posted on 2011-10-11
6
Medium Priority
?
367 Views
Last Modified: 2012-06-21
Hi there,

Is there a way I can get the size of a particual folder in the mailbox using powershell command?  I need to identify the size of a subfolder in the inbox.

Thanks
0
Comment
Question by:annayeg
  • 4
6 Comments
 
LVL 18

Expert Comment

by:Andrej Pirman
ID: 36952882
Exchange Management Shell C-lets will do this for you. Here is the syntax of your desired query:
http://technet.microsoft.com/en-us/library/bb691419%28EXCHG.80%29.aspx
0
 
LVL 5

Expert Comment

by:rajkr2020
ID: 36953826
user

get-mailboxfolderstatistics -identity username | ft "name", "FolderSize"

0
 
LVL 1

Author Comment

by:annayeg
ID: 36958267
Is there a way to get only users who have "my folder" size greater than 15mb
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 1

Author Comment

by:annayeg
ID: 36959439
I've have the following code, but everytime it runs it gives me the following message:
cmdlet get-mailboxfolderstatistics at command pipeline position 1
Supply values for the following parameters:
Identity:


Here's the code
Get-Mailbox | foreach {
   $mbx = $_.DisplayName;
   Get-MailboxFolderStatistics |where {$_.name -eq "foldername"} | select @{n="DisplayName";e={$mbx}},FolderPath,ItemsInFolder,@{n="FolderSize(MB)";e={$_.folderSize.toMB()}}
} | export-csv c:\TEST.csv



Any idea what I am doing wrong?  Basically, I am trying to get  the size of the foldername for each user.
0
 
LVL 1

Accepted Solution

by:
annayeg earned 0 total points
ID: 36982337
Here's what I got working:

Get-Mailbox -ResultSize unlimited | Get-MailboxFolderStatistics | where {$_.name -eq "nameoffolder"} | ft Identity, FolderPath, ItemsInFolder, @{Label="FolderSize(MB)";expression={$_.FolderSize.ToMB()} }, @{Label="FolderSize(MB)";expression={$_.FolderAndSubfolderSize.ToMB()} } -a | out-file C:\test.txt
0
 
LVL 1

Author Closing Comment

by:annayeg
ID: 37010587
I found what worked for me.
0

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  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

Exchange database can often fail to mount thereby halting the work of all users connected to it. Finding out why database isn’t mounting is crucial and getting the server back online. Stellar Phoenix Mailbox Exchange Recovery is a champion product t…
Welcome to 2018! Exciting things lie ahead in the world of tech. To start things off, we compiled great member articles on how to stay safe, ways to learn, and much more! Read on to start your new year right.
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
Screencast - Getting to Know the Pipeline

571 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