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

x
?
Solved

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

Posted on 2014-10-16
3
Medium Priority
?
192 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 2000 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

Introducing the WatchGuard 420 Access Point

WatchGuard's newest access point includes an 802.11ac Wave 2 chipset, providing the fastest speeds for VoIP, video and music streaming, and large data file transfers. Additionally, enjoy the benefits of strong security as the 3rd radio delivers dedicated WIPS protection!

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…
The core idea of this article is to make you acquainted with the best way in which you can export Exchange mailbox to PST format.
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 shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

704 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