Get-Mailbox does not reflect the correct Server name for Mailboxes on databases for a DAG

We got notified from customers, that the powershell commandlet get-mailbox in Exchange 2010 (see and in Exchange 2013 (see do not always return the correct ServerName  or ServerLegacyDn for the given mailbox. Those customers often rely for their backups or customized mailbox processes on the information, on which server a given mailbox is currently located.

We told our customers, that their findings are indeed true and  that these attributes, which are returned via get-mailbox are written only at special events, like at creation time of the mailbox or after a move mailbox has taken place. On a DAG the mailbox database can be owned by any of the possible owners of that database. Changing the possible owner of that database is considered to be a circumstance of making sure, that this database is healthy. At any time the smooth switch to a different owner is much more important than the update of all the properties of the mailboxes on that database. The update of the ServerName property with a mailbox comes with a certain performance penalty. Our product group decided therefore not to take that penalty for Database moves to a different possible owner.

So how to overcome this "by design", if You need the Server name, where the mailbox is currently really located ?

The current proposal for a solution is to use "get-mailboxstatistics <mailboxID> | fl Displayname, ServerName" or "get-mailbox | get-mailboxstatistics |fl Displayname, ServerName". If Displayname is too ambiguous, you may use Identity or PrimarySMTPAddress instead.

Comments (3)
  1. thanks says:

    old stuff but good to remember

  2. v-9 exchange support says:

    Also to add if we can check the value of the attribute "homemdb" on the mailbox it will be the dn of the database where the mailbox is residing.

  3. workaround says:

    ServerLegacyDN and ServerName values are stamped based on where the database was mounted when the mailbox was created or last moved. It is possible to get it to update by running:

    Set-Mailbox –Database


Comments are closed.

Skip to main content