[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 92
  • 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

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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