Solved

EXCHANGE, ACTIVE DIRECTORY

Posted on 2016-09-12
4
63 Views
Last Modified: 2016-09-14
I want to get list of email users in each AD site. I am running exchange 2007

can I run any command on my exchange or active directory
0
Comment
Question by:pramod1
  • 2
4 Comments
 
LVL 14

Accepted Solution

by:
Todd Nelson earned 500 total points
ID: 41794890
Something similar to this? ...

Get-ExchangeServer | Where-Object { $_.Site -like "*headquarters*" } | Get-Mailbox | Select-Object Name,PrimarySmtpAddress | Export-Csv C:\Mailboxes.csv -NoTypeInformation

Open in new window


You may have to enter the name of each site but it should suffice.
0
 

Author Comment

by:pramod1
ID: 41794944
Get-StorageGroup -Identity "server name\First storage Group" | Get-MailboxDataBase | get-mailbox

cant I use something like this
0
 
LVL 14

Expert Comment

by:Todd Nelson
ID: 41794953
Sure to get mailboxes in a specific storage group.  Storage groups aren't always tied to an AD site.  You said you needed a list of email users in each AD site.  Did I understand that correctly?
0
 
LVL 11

Expert Comment

by:Brian Murphy
ID: 41794972
What version of AD?  This should work on 2008 AD level and above.

It will export all the user information from Exchange using the AD Attributes.  Then save as XLSX then filter or sort.

Get-AdUser -Filter * -Properties UserPrincipalName, Name, EmailAddress | Select-Object UserPrincipalName, Name, EmailAddress | Export-CSV -Path C:\Admin\UsersSMTP<date>.csv -NoTypeInformation
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
In this video we show how to create an email address policy in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Mail Flow…
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…

911 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now