Solved

need assistance with a powershell script to capture archive sizes

Posted on 2013-02-07
3
270 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

Technology Partners: 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

Check out this step-by-step guide for using the newly updated Experts Exchange mobile app—released on May 30.
In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
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 shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Suggested Courses

617 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