Need to get size of a folder inside the Inbox

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
LVL 1
annayegAsked:
Who is Participating?
 
annayegAuthor Commented:
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
 
Andrej PirmanCommented:
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
 
rajkr2020Commented:
user

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

0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
annayegAuthor Commented:
Is there a way to get only users who have "my folder" size greater than 15mb
0
 
annayegAuthor Commented:
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
 
annayegAuthor Commented:
I found what worked for me.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.