Solved

exchange 2010/2013 count and list users in a databas text file

Posted on 2014-10-16
3
183 Views
Last Modified: 2014-10-28
Does anyone have a powershell script that lists and counts the user for each exchange database
0
Comment
Question by:techdrive
[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
  • 2
3 Comments
 
LVL 29

Expert Comment

by:becraig
ID: 40384722
Mailboxes
(get-mailboxdatabase) | foreach-object {write-host $_.name (get-mailbox -database $_.name).count}

Open in new window


From technet:
https://social.technet.microsoft.com/Forums/exchange/en-US/99dab102-1b49-4ce2-8b85-dc247ae1fc84/powershell-commnd-to-count-the-number-of-mailboxes-per-database-in-exchange-2010?forum=exchange2010
0
 

Author Comment

by:techdrive
ID: 40384746
I see or I could do something like this but I need to write to a file rather than to the screen and how do I get other get-mailbox properties.

$maildb = get-content c:\temp\listofdb.csv

for {$maildb in maildbx} (
 
{write-host $_.name (get-mailbox -database $_.name).count}

 }
0
 
LVL 29

Accepted Solution

by:
becraig earned 500 total points
ID: 40384758
Just add an export-csv  
$maildb = get-content c:\temp\listofdb.csv

for {$maildb in maildbx} ( 
{write-host $_.name (get-mailbox -database $_.name).count}
 }  | export-csv  file.csv -nti

Open in new window

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

Question has a verified solution.

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

This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
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…
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

752 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