Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

need assistance with a powershell script to capture archive sizes

Posted on 2013-02-07
3
Medium Priority
?
271 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 44

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 2000 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

How to deal with a specific error when using the Enable-RemoteMailbox cmdlet to create a mailbox in the cloud-based service, for an existing user in an on-premises Active Directory.
Want to know how to use Exchange Server Eseutil command? Go through this article as it gives you the know-how.
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…
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

722 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