[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Get-Mailbox with users database and jobtitle

Posted on 2013-12-10
6
Medium Priority
?
2,067 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 2000 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
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

The new Microsoft OS looks great, is easier than ever to upgrade to, it is even free.  So what's the catch?  If you don't change the privacy settings, Microsoft will, in accordance with the (EULA) you clicked okay to without reading, collect all the…
This collection of functions covers all the normal rounding methods of just about any numeric value.
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
Viewers will learn the different options available in the Backstage view in Excel 2013.

656 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