Skip to main content

Microsoft

Office 365 – Script To Determine Exchange Online Mailbox Location

When you move your mailboxes to the cloud, there are some details that you lose a little bit of insight into. While an acceptable answer to “where are my mailboxes” might be “the cloud”, I was curious as to how distributed they are.
We know that an Office 365 tenant is limited to a single region which is determined when you create the tenant. What we don’t know is how many datacenters or servers your data is spread across.
I recently put together a script that shows the distribution of mailboxes across Microsoft datacenters.

The locations of Office 365 datacenters doesn’t seem to be commonly published with much detail. The Microsoft “Where is My Data?” page lists North America datacenters as “Washington, Texas, Illinois and other United States datacenters“. I was recently browsing the documentation for the “Office 365 Client Performance Analyzer” tool and noticed it had a nice table of datacenter codes and locations. These same codes exist on the mailbox server names where your mailboxes reside.
With that data, I put together a script that provides the following output:

As you can see, the mailboxes are pretty widely distributed across servers and geographies.
Is this information critical in your management of Office 365? No, probably not; you’re paying Microsoft for an SLA and part of that is letting them handle where the mailboxes are best located. I do find the distribution interesting though when you look at the massive number of servers being used in a single tenant just for mailboxes alone.

Download

The script for this post can be found in the Microsoft Script Center at the following link: Get-MailboxLocations.ps1
Did you find this article helpful?
Leave a comment below or follow me on Twitter (@JoePalarchio) for additional posts and information on Office 365.

Looking to do some more reading on Office 365?
Catch up on my past articles here: Joe Palarchio.

Thoughts on “Office 365 – Script To Determine Exchange Online Mailbox Location”

  1. Thank you for your script!
    iv’e run it and found another 2 datacenters which were missing from it:
    $Datacenter[“AM4”]=@(“EUR”,”Amsterdam, Netherlands”)
    $Datacenter[“DB5”]=@(“EUR”,”Dublin, Ireland”)

  2. Ofir-
    I actually just updated the script so I only look at the first two characters which should cover expansion. If you download the latest from the gallery, it should work.
    Thanks for the feedback!
    Joe

  3. Hmmm thanks, this script might be big for the two canandian data centers to help prove that data is indeed staying in Canada. This will be a huge driving factor for government and accounting adoption.

  4. Australia was missing as well, I added
    $Datacenter[“ME”]=@(“APC”,”Melbourne, Victoria, Australia”)
    $Datacenter[“SY”]=@(“APC”,”Sydney, New South Wales, Australia”)

  5. Is there a similar script available to identify the locations for our Office 365 online tenant’s SharePoint/OneDrive information?

  6. Larry-
    I have not seen anyone do this with OneDrive but I’ll do a little digging and see if there’s a way to tell.

  7. Thanks Joe. I did receive information from Microsoft (via Premier ticket) as to where our tenant’s primary and secondary datacenters are located for SPO.
    FYI – “Virginia, USA” is more than likely “Boydton, Virginia, USA”.

  8. Missing, the following
    $Datacenter[“YQ”]=@(“CAN”,”Montreal, Quebec, Canada”)
    $Datacenter[“YT”]=@(“CAN”,”Toronto, Ontario, Canada”)

  9. MM and LO are the two new codes for the UK datacentres. LO = London and MM = Durham. These are GBR and not EUR as well.
    $Datacenter[“MM”]=@(“GBR”,”Durham, England”)
    $Datacenter[“LO”]=@(“GBR”,”London, England”)
    The codes are all to do with the IATA Airport Code (MM=Durham

  10. Will the data for Sharepoint, Skype and OneDrive be in the same Datacenter region as Exchange? Eg I assume if I have Exchange mailboxes in the UK datacenters then my Sharepoint data wont be in the US?

  11. script looks great, it will be even better if there will be another script for location of online archive mailbox while the user mailbox is on premise

  12. Johan Parlevliet

    Re: $Datacenter[“HE”]=@(“EUR”,”Finland”)
    $Datacenter[“VI”]=@(“EUR”,”Austria”). That is probably HE for Helsinki and VI for Vienna

  13. Great Script! Now what would be nice if we can somehow add the following. Extra option = list all mailboxes in a given data center… or type smtp address of the mailbox and it will show you which Data center specific user is in…

  14. Alexandre Coelho

    Thanks for your script!
    Do you know the code for the new Microsoft Datacenter in Santiago – Chile?
    South American customers on Exchange Online are having part of their accounts transferred to this Datacenter.

  15. Hi Joe, We’ve been using your script for about a year now (and thank you!) but recently have a [blank] in the Datacenter column. Do you have an updated list of Datacenters? Or is there an easy way to find them? One of the new listings is server: mwhpr05mb2862.

  16. Johan Parlevliet

    Please replace
    $Datacenter[“HE”]=@(“EUR”,”Finland”)
    $Datacenter[“VI”]=@(“EUR”,”Austria”)
    with
    $Datacenter[“HE”]=@(“EUR”,”Helsinki, Finland”)
    $Datacenter[“VI”]=@(“EUR”,”Wien, Austria”)

  17. Johan Parlevliet

    Hi Julie. What is the contents of $_.ServerName.SubString(0,2)
    That is not “mw” of mwhpr05mb2862″ I suppose, because MW is in the list
    $Datacenter[“MW”]=@(“NAM”,”Quincy, Washington, USA”)
    Total list
    $Datacenter = @{}
    $Datacenter[“CP”]=@(“LAM”,”Brazil”)
    $Datacenter[“GR”]=@(“LAM”,”Brazil”)
    $Datacenter[“HK”]=@(“APC”,”Hong Kong”)
    $Datacenter[“SI”]=@(“APC”,”Singapore”)
    $Datacenter[“SG”]=@(“APC”,”Singapore”)
    $Datacenter[“KA”]=@(“JPN”,”Japan”)
    $Datacenter[“OS”]=@(“JPN”,”Japan”)
    $Datacenter[“TY”]=@(“JPN”,”Japan”)
    $Datacenter[“AM”]=@(“EUR”,”Amsterdam, Netherlands”)
    $Datacenter[“DB”]=@(“EUR”,”Dublin, Ireland”)
    $Datacenter[“HE”]=@(“EUR”,”Finland”)
    $Datacenter[“VI”]=@(“EUR”,”Austria”)
    $Datacenter[“BL”]=@(“NAM”,”Virginia, USA”)
    $Datacenter[“SN”]=@(“NAM”,”San Antonio, Texas, USA”)
    $Datacenter[“BN”]=@(“NAM”,”Virginia, USA”)
    $Datacenter[“DM”]=@(“NAM”,”Des Moines, Iowa, USA”)
    $Datacenter[“BY”]=@(“NAM”,”San Francisco, California, USA”)
    $Datacenter[“CY”]=@(“NAM”,”Cheyenne, Wyoming, USA”)
    $Datacenter[“CO”]=@(“NAM”,”Quincy, Washington, USA”)
    $Datacenter[“MW”]=@(“NAM”,”Quincy, Washington, USA”)
    $Datacenter[“CH”]=@(“NAM”,”Chicago, Illinois, USA”)
    $Datacenter[“ME”]=@(“APC”,”Melbourne, Victoria, Australia”)
    $Datacenter[“SY”]=@(“APC”,”Sydney, New South Wales, Australia”)
    $Datacenter[“KL”]=@(“APC”,”Kuala Lumpur, Malaysia”)
    $Datacenter[“PS”]=@(“APC”,”Busan, South Korea”)
    $Datacenter[“YQ”]=@(“CAN”,”Quebec City, Canada”)
    $Datacenter[“YT”]=@(“CAN”,”Toronto, Canada”)
    $Datacenter[“MM”]=@(“GBR”,”Durham, England”)
    $Datacenter[“LO”]=@(“GBR”,”London, England”)

  18. I Reckon there is an old version of the script available for download now, because the $Datacenter locations are not included in the script only the $region. I am just a rooky to powershell so i don’t know how and where to add it in te script, can you please upload the latest version of the script ore just paste the complete script in text..

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Joe Palarchio

More from this Author

Categories
Follow Us
TwitterLinkedinFacebookYoutubeInstagram