Solved

Powershell script export exchange 2010 mailbox info

Posted on 2013-11-11
2
543 Views
Last Modified: 2013-11-19
Hi

I am after a Powershell script that will get me the following info for a single database

name, totalitemsize, PrimarySMTPAddress, Emailaddresses

The problem I'm having is that 2 pieces of the info I want are properties of the get-mailbox cmdlet and the other 2 are of the get-mailboxstatistics cmdlet, how can I get all the info in one go.

I run the below to give me the info from get-mailboxstatistics but cant get the additional info I want.

get-mailboxdatabase "Mailbox Database 01" | Get-mailbox | get-mailboxstatistics | ft displayname,totalitemsize 

Open in new window

0
Comment
Question by:ncomper
[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 Comments
 
LVL 41

Accepted Solution

by:
Vasil Michev (MVP) earned 500 total points
ID: 39639822
Like this for example:

Get-Mailbox | ft name,displayName,@{Name='totalitemsize';Expression={(Get-MailboxStatistics $_.userprincipalname).TotalItemSize}},primarySmtpaddress,emailaddresses

Open in new window

0
 
LVL 5

Author Closing Comment

by:ncomper
ID: 39659707
Thanks
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

This article explains how to install and use the NTBackup utility that comes with Windows Server.
In-place Upgrading Dirsync to Azure AD Connect
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
how to add IIS SMTP to handle application/Scanner relays into office 365.

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