Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

EXCHANGE, ACTIVE DIRECTORY

Posted on 2016-09-12
4
Medium Priority
?
88 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
[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
4 Comments
 
LVL 16

Accepted Solution

by:
Todd Nelson earned 2000 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 16

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 13

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

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

Question has a verified solution.

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

Wouldn't it be nice if objects in Active Directory automatically moved into the correct Organizational Units? This is what AutoAD aims to do and as a plus, it automatically creates Sites, Subnets, and Organizational Units.
Are you an Exchange administrator employed with an organization? And, have you encountered a corrupt Exchange database due to which you are not able to open its EDB file. This article will explain all the steps to repair corrupt Exchange database.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Suggested Courses

636 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