Solved

need assistance with a powershell script to capture archive sizes

Posted on 2013-02-07
3
263 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
Comment Utility
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
Comment Utility
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
Comment Utility
perfect. thx Subsun!
0

Featured Post

Too many email signature updates to deal with?

Do you feel like you are taking up all of your time constantly visiting users’ desks to make changes to email signatures? Wish you could manage all signatures from one central location, easily design them and deploy them quickly to users? Well, there is an easy way!

Join & Write a Comment

ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
This article will help you understand what HashTables are and how to use them in PowerShell.
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
To show how to create a transport rule 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 >> Rules tab.:  To cr…

763 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

11 Experts available now in Live!

Get 1:1 Help Now