Solved

need assistance with a powershell script to capture archive sizes

Posted on 2013-02-07
3
264 Views
Last Modified: 2013-02-07
can someone provide a way to modify this script to capture the "online archive" sizes rather than the primary mailbox:

$mbxs = import-csv c:\list.csv

$mbxs | foreach {Get-MailboxStatistics  $_.username | select DisplayName,@{label="Total Size (MB)";expression={$_.TotalItemSize.Value.ToMB()} }} -archive | export-csv c:\size.csv

thx in advance!

S.
0
Comment
Question by:siber1
3 Comments
 
LVL 41

Expert Comment

by:Amit
ID: 38865460
Create one txt file, enter the email addresses and then use below command

Get-Content mailboxes.txt | get-mailbox| select DisplayName | Get-MailboxFolderStatistics
-archive | Export-Csv archive.csv

or

 get-mailbox| select DisplayName | Get-MailboxFolderStatistics -archive | Export-Csv archive.csv
0
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
ID: 38865466
Try..
$mbxs = import-csv c:\list.csv

$mbxs | foreach {Get-MailboxStatistics  $_.username -archive | select DisplayName,@{label="Total Size (MB)";expression={$_.TotalItemSize.Value.ToMB()} }} | export-csv c:\size.csv

Open in new window

0
 

Author Closing Comment

by:siber1
ID: 38865500
perfect. thx Subsun!
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
Find out what you should include to make the best professional email signature for your organization.
In this video we show how to create an Accepted Domain in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Ac…
how to add IIS SMTP to handle application/Scanner relays into office 365.

911 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now