How can I export folder list with sizes?
What I am trying to do is export a single users mailbox folder list with sizes for each folder. Basically the same layout as when you view mailbox properties in Outlook and click the "Folder Size" button. So far what I have tried is: Get-MailboxFolderStatistics -Identity useralias | export-csv username.csv The problem with this command is it outputs a ton of information I do not want. All I want is folder name, folder path, folder size. Thanks Zak Lyles
December 7th, 2010 11:25am

Just add a select to filter for the properties you want: Get-MailboxFolderStatistics -Identity useralias | select name,folderpath,foldersize |export-csv username.csv -notype [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
Free Windows Admin Tool Kit Click here and download it now
December 7th, 2010 11:39am

Sorry for the late reply, that is exactly what I needed; however, it is displaying folder size in bytes, how can I display in MB? Thanks for the help! Zak Lyles
December 14th, 2010 12:35pm

Try this: Get-MailboxFolderStatistics -Identity useralias | select name,folderpath,@{label="foldersize(MB)";expression={$_.foldersize.toMB()}} | export-csv username.csv -notype [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
Free Windows Admin Tool Kit Click here and download it now
December 14th, 2010 6:16pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics