Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 100
  • Last Modified:

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
0
pramod1
Asked:
pramod1
  • 2
1 Solution
 
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.

Join & Write a Comment

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.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now