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

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

Mailboxes in a DAG

Hi

We have a DAG named DAG1. It is composed of about 10 mailbox servers.

I'd like to run a command to find all the mailboxes on that DAG, but can't seem to get this to work. Does anyone know how to?
0
richlionel
Asked:
richlionel
1 Solution
 
S_K_SCommented:
Get-mailboxdatabase "name of the Database on the concerned DAG" | Get-mailbox
0
 
ksharma4Commented:
In a DAG if you have databases named as DB1,DB2...DB10 then run below command -

Get-MailboxDatabase DB* |Get-Mailbox -resultsize unlimited

Incase you have exchange installed in different domains make sure to run before running above command

Set-adserversettings -viewentireforest $false
0
 
S_K_SCommented:
You might want to get the data output also to a file

Get-MailboxDatabase DB* |Get-Mailbox -resultsize unlimited | Export-Csv -NoTypeInformation -Path C:\Data.csv
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
S_K_SCommented:
or better use this

Get-MailboxDatabase DB* |Get-Mailbox -resultsize unlimited >C:\Data.csv
0
 
page1985Commented:
Do you have more than one DAG?  Do you have databases that do not belong to the DAG you want to process?
0
 
Manpreet SIngh KhatraSolutions Architect, Project LeadCommented:
You can work with Multiple ways ..... Get all into a .ps1

Get-Mailbox |Get-MailboxDatabase DB1 -resultsize unlimited >C:\MailboxDB1.csv
Get-Mailbox |Get-MailboxDatabase DB2 -resultsize unlimited >C:\MailboxDB2.csv Get-Mailbox |Get-MailboxDatabase DB3 -resultsize unlimited >C:\MailboxDB3.csv Get-Mailbox |Get-MailboxDatabase DB4 -resultsize unlimited >C:\MailboxDB4.csv
Get-Mailbox |Get-MailboxDatabase DB5 -resultsize unlimited >C:\MailboxDB5.csv
So on .......

Get-Mailbox -Server "ServerName" -resultsize unlimited >C:\MailboxServer1.csv
Get-Mailbox -Server "ServerName" -resultsize unlimited >C:\MailboxServer2.csv
Get-Mailbox -Server "ServerName" -resultsize unlimited >C:\MailboxServer3.csv
Get-Mailbox -Server "ServerName" -resultsize unlimited >C:\MailboxServer4.csv
So on .......

If you want the output with some specific data you can do a FL and the attributes

- Rancy
0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

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