Solved

need assistance with a powershell script to capture archive sizes

Posted on 2013-02-07
3
267 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 43

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The following article is intended as a guide to using PowerShell as a more versatile and reliable form of application detection in SCCM.
In-place Upgrading Dirsync to Azure AD Connect
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
This video discusses moving either the default database or any database to a new volume.

762 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