?
Solved

exchange 2007/2010 mailbox sizes

Posted on 2010-11-09
7
Medium Priority
?
638 Views
Last Modified: 2012-06-21
Is there a way in powershell I can use an input text list of users/aliases to feed in and output mailbox sizes and item counts to a CSV file?
0
Comment
Question by:ENTPF
[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
  • 4
  • 3
7 Comments
 
LVL 49

Expert Comment

by:Akhater
ID: 34095813
import-csv c:\users.csv | get-mailboxstatistics | select-object displayname,itemcount,totalitemsize | export-csv c:\mailboxstat.csv
0
 

Author Comment

by:ENTPF
ID: 34096486
getting nothing in the output file.  
0
 
LVL 49

Expert Comment

by:Akhater
ID: 34096503
what do you have in your input file ?
what is the output of import-csv c:\users.csv alone
0
Need protection from advanced malware attacks?

Look no further than WatchGuard's Total Security Suite, providing defense in depth against today's most headlining attacks like Petya 2.0 and WannaCry. Keep your organization out of the news with protection from known and unknown threats.

 

Author Comment

by:ENTPF
ID: 34096637
just usernames in the input file.  
output file does not show anything even there is no command in between import and export.
0
 
LVL 49

Expert Comment

by:Akhater
ID: 34096649
import-csv c:\users.csv | get-mailboxstatistics

try this  alone any output?

0
 

Author Comment

by:ENTPF
ID: 34096690
Get-MailboxStatistics : The input object cannot be bound to any parameters for
the command either because the command does not take pipeline input or the inpu
t and its properties do not match any of the parameters that take pipeline inpu
t.
At line:1 char:74
0
 
LVL 49

Accepted Solution

by:
Akhater earned 2000 total points
ID: 34096781
ok


1. in the top of your csv file add name so it looks something like

name
administrator
ENTPF
AKhater

2. change the code to

import-csv "C:\userscsv" | foreach{ Get-MailboxStatistics $_.name |  select-object displayname,itemcount,totalitemsize} | Export-Csv c:\t.txt
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
If you troubleshoot Outlook for clients, you may want to know a bit more about the OST file before doing your next job. IMAP can cause a lot of drama if removed in the accounts without backing up.
This video discusses moving either the default database or any database to a new volume.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Suggested Courses
Course of the Month13 days, 13 hours left to enroll

800 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