Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 646
  • Last Modified:

exchange 2007/2010 mailbox sizes

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
ENTPF
Asked:
ENTPF
  • 4
  • 3
1 Solution
 
AkhaterCommented:
import-csv c:\users.csv | get-mailboxstatistics | select-object displayname,itemcount,totalitemsize | export-csv c:\mailboxstat.csv
0
 
ENTPFAuthor Commented:
getting nothing in the output file.  
0
 
AkhaterCommented:
what do you have in your input file ?
what is the output of import-csv c:\users.csv alone
0
NEW Internet Security Report Now Available!

WatchGuard’s Threat Lab is a group of dedicated threat researchers committed to helping you stay ahead of the bad guys by providing in-depth analysis of the top security threats to your network.  Check out this quarters report on the threats that shook the industry in Q4 2017.

 
ENTPFAuthor Commented:
just usernames in the input file.  
output file does not show anything even there is no command in between import and export.
0
 
AkhaterCommented:
import-csv c:\users.csv | get-mailboxstatistics

try this  alone any output?

0
 
ENTPFAuthor Commented:
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
 
AkhaterCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now