PowerShell Script to Determine Location of Mailboxes in Exchange Online

Script to show how many databases, servers, datacenters and locations your Exchange Online mailboxes are distributed across.

4.8 Star
Add to favorites
Office 365
E-mail Twitter del.icio.us Digg Facebook
  • Where is the link for download?
    1 Posts | Last post October 22, 2019
  • Download
    1 Posts | Last post October 15, 2019
    • Is the script still available to download ?
  • Script Exists
    2 Posts | Last post August 28, 2019
    • Hi Joseph,
      Do you know how I can download this script, Please?
    • Hi Joseph,
      Database field returns always strings which start with first "EUR" letters.
      I am looking how to update regularly data-centers list, and the script was here, would be helpful.
      The list like the following:
      $Datacenter["HE"]=@("EUR","Helsinki, Finland")
      $Datacenter["VI"]=@("EUR","Vienna, Austria")
      New data-centers appear in the world, and I have no idea where to take them.
  • There is no download button
    1 Posts | Last post May 22, 2019
    • Hi Joseph:
      I cannot find any download button on this page to download the script.
      Is the script still available through this page?
  • ServerName field is not accurate, may want to move onto Database.
    2 Posts | Last post April 04, 2019
    • Not a question but a statement. :)
      The script is a really awesome effort, but the ServerName field is really a dead attribute that hasn't been accurate since Exchange 2007 when trying to follow where a mailbox resides. You may see the servername that held the active copy of the mailbox database when the mailbox was first provisioned, but later on as the mailbox moves around to different databases or datacenters holding additional copies of the same mailbox database it may never update ever again. We activate different mailbox database copies all the time and also will relocate mailboxes to new DBs as part of normal service maintenance. Very quickly that initial value of the ServerName becomes stale data.
      A more accurate form of measurement is the 'database' (or 'archivedatabase') field. This field always starts with the three letter code of the geo (aka region) the mailbox is located within. For example a DB starting with 'AUS' is in Australia eo or 'GBR' is in the United Kingdom geo.
    • Thanks for the feedback Brian; I've decided to pull this script based on your notes.  This was something that started back when I was working at a partner and was mostly just to show how widely distributed mailboxes would be across the service.  It evolved to speculation on server names and locations and became more popular than I would have imagined.
  • Comment from Author
    1 Posts | Last post April 04, 2019
    • Thanks all for the comments over the years on this script.  It was something that I put together while working as a consultant for a partner and at the time was more or less a demonstration of the distribution of mailboxes across a wide number of databases and servers.  I have since taken a role at Microsoft and much has changed in the service including the offering of multi-geo capabilities.  I have removed this script per the comments by Brian Day regarding the accuracy of the attribute being used; unfortunately I have no access to the original blog post as it is on my former's employers site.
  • Script only return "North America",not specific datacenters
    2 Posts | Last post July 18, 2018
    • We just ran the script, but all we got was a vague "North America" and not the specific data centers like the sample mentions.  Something I did wrong or did Microsoft change something?  thanks
      Region   Mailboxes
      ------   ---------
      North America/USA  19714
    • Seems the change from using ServerName to Database as mentioned the previous reply has made this script less accurate for larger regions like USA and EU - all we get as a result now is "Europe" which makes this useless for when your mailboxes are only meant to be in one region but cover multiple sub-regions e.g. state or country.
  • Updated List?
    1 Posts | Last post February 26, 2018
    • I'd like to update the locations within the script as the majority of our mailboxes show as no location.
      Where did you get the information on server locations from or was it best guess?
      I have a mixture of lo2p265, lnxp265, cwlp265 and cwxp265 - I am assuming lo and ln are London and cw are Cardiff, Wales but this is only a guess.
      Also, any idea what makes up the name? 
  • Update 2 datacenters
    1 Posts | Last post August 01, 2017
    • Please replace
      $Datacenter["HE"]=@("EUR","Helsinki, Finland")
      $Datacenter["VI"]=@("EUR","Vienna, Austria")
  • Where can I go to update datacenters?
    1 Posts | Last post May 24, 2017
    • Hi,
      Where do you get the new list of datacenters?
      I ran the script in my organization and there was a blank line.
1 - 10 of 21 Items