Quantcast
Viewing all articles
Browse latest Browse all 8820

Exchange powershell script to find all users mailbox sizes

Hi guys, I'm using the following script to tell me how big everyone's mailboxes are.

Get-MailboxStatistics -Server 'SERVERNAME' | where {$_.ObjectClass -eq “Mailbox”} | Sort-Object TotalItemSize -Descending | ft @{label=”User”;expression={$_.DisplayName}},@{label=”Total Size (MB)”;expression={$_.TotalItemSize.Value.ToMB()}}  -auto >> “c:\Temp\mailbox_size.txt”

Pretty straight forward, exports as a text file.

I want to archive the files for future reference., so how can I have the text file created with the date & time it was created in the file name?

thanks in advance :)

Shane


Viewing all articles
Browse latest Browse all 8820

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>