This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

GetUserFolders.ps1

By: a guest on Nov 15th, 2012  |  syntax: Power Shell  |  size: 0.43 KB  |  views: 224  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. param([string]$user)
  2. if ($user -eq ""){$user = read-host "Please enter user"}
  3. get-mailbox $user |Get-MailboxFolderStatistics | where {$_.ItemsInFolder -gt 0} |sort-object -descending foldersize | ft folderpath, itemsinfolder, @{label="Folder Size(MB)";expression={$_.FolderSize.ToMB()}} -autosize
  4. get-mailboxstatistics $user | ft DisplayName,@{label= "Total Size (MB)";expression={$_.TotalItemSize.Value.ToMB()}}, ItemCount, DatabaseName
clone this paste RAW Paste Data