Solved

Get-Mailbox with users database and jobtitle

Posted on 2013-12-10
6
1,741 Views
Last Modified: 2013-12-10
Wondering if anyone can help out with this, I'm looking to find all the mailboxes with users database and what their job title is.

I have run this EMC cmdlet though not quite getting what im looking for.

Get-Mailbox -ResultSize Unlimited | select firstname, lastname, primarysmtpaddress, jobtitle, database | Export-Csv c:\SMTPList.csv

it gives me a list of all the mailboxes and what the Primary SMTP Address is and what database but not the jobtitle.

Exhchange 2007.

Thanks.
0
Comment
Question by:damejen
[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
  • 3
  • 3
6 Comments
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
ID: 39708294
Get-Mailbox output does not have properties called jobtitle, firstname & lastname. You need to create custom properties to get these details in your report..
Try..
Get-Mailbox -ResultSize Unlimited | % {
$Obj = $_ | Get-Recipient
$_ | Select @{N="firstname";E={$Obj.firstname}}, @{N="lastname";E={$Obj.lastname}}, primarysmtpaddress,@{N="JobTitle";E={$Obj.Title}}, database
}| Export-Csv c:\SMTPList.csv

Open in new window

0
 

Author Closing Comment

by:damejen
ID: 39708310
Brilliant!!! Thanks for the help Subsun, this hit the nail on the head.
0
 

Author Comment

by:damejen
ID: 39708539
Hi Subsun, hope you could help with adding something else to this, getting the mailbox sizes as well? Not sure if you would pipe Get-MailboxStatistics in there somehere?

thanks.
0
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

 
LVL 40

Expert Comment

by:Subsun
ID: 39708663
Try this..
Get-Mailbox -ResultSize Unlimited | % {
$Obj = $_ | Get-Recipient
$_ | Select @{N="firstname";E={$Obj.firstname}}, @{N="lastname";E={$Obj.lastname}}, primarysmtpaddress,@{N="JobTitle";E={$Obj.Title}},database,@{N="TotalItemSize";E={($_ | Get-MailboxStatistics).TotalItemSize}}
}| Export-Csv c:\SMTPList.csv

Open in new window

In future please open a new question for additional requests.. :-)
0
 

Author Comment

by:damejen
ID: 39708720
Thanks a million Subsun. Works like a charm.
0
 
LVL 40

Expert Comment

by:Subsun
ID: 39708728
You are welcome!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The password reset disk is often mentioned as the best solution to deal with the lost Windows password problem. In Windows 2008, 7, Vista and XP, a password reset disk can be easily created. But besides Windows 7/Vista/XP, Windows Server 2008 and ot…
Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

726 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