Solved

exchange 2007/2010 mailbox sizes

Posted on 2010-11-09
7
627 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
  • 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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Exchange 2013 POP3 2 26
Exchange 2010 Room mailboxes 5 32
Existing Office 365 implement on-premise AD 4 35
exchange, email gateway 2 27
A brief introduction to what I consider to be the best editor for PowerShell.
This article explains how to install and use the NTBackup utility that comes with Windows Server.
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager

813 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

17 Experts available now in Live!

Get 1:1 Help Now