EXCHANGE, ACTIVE DIRECTORY

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
pramod1Asked:
Who is Participating?
 
Todd NelsonSystems EngineerCommented:
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
 
pramod1Author Commented:
Get-StorageGroup -Identity "server name\First storage Group" | Get-MailboxDataBase | get-mailbox

cant I use something like this
0
 
Todd NelsonSystems EngineerCommented:
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
 
Brian MurphyIT ArchitectCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.