在多地理位置环境中管理 Exchange Online 邮箱Administering Exchange Online mailboxes in a multi-geo environment

在 Microsoft 365 环境中查看和配置多地理位置属性需要 Exchange Online PowerShell。Exchange Online PowerShell is required to view and configure multi geo properties in your Microsoft 365 environment. 若要连接到 Exchange Online PowerShell,请参阅连接到 Exchange Online PowerShellTo connect to Exchange Online PowerShell, see Connect to Exchange Online PowerShell.

你需要 Microsoft Azure Active Directory PowerShell 模块 v1.1.166.0 或 v1.x 中的更高版本才能查看用户对象的 PreferredDataLocation 属性。You need the Microsoft Azure Active Directory PowerShell Module v1.1.166.0 or later in v1.x to see the PreferredDataLocation property on user objects. 无法通过 AAD PowerShell 直接修改通过 AAD Connect 同步到 AAD 中的用户对象的 PreferredDataLocation 值。User objects synchronized via AAD Connect into AAD cannot have their PreferredDataLocation value directly modified via AAD PowerShell. 可以通过 AAD PowerShell 修改仅限云的用户对象。Cloud-only user objects can be modified via AAD PowerShell. 若要连接到 Azure AD PowerShell,请参阅连接到 PowerShellTo connect to Azure AD PowerShell, see Connect to PowerShell.

在 Exchange Online 多地理位置环境中,无需执行任何手动步骤将地理位置添加到租户。In Exchange Online multi-geo environments, you don't need to do any manual steps to add geos to your tenant. 收到消息中心帖子显示多地理位置已可供 Exchange Online 使用后,所有可用地理位置都可供你使用并配置。After you receive the Message Center post that says multi-geo is ready for Exchange Online, all available geos will be ready and configured for you to use.

使用 Exchange Online PowerShell 直接连接到某个地理位置Connect directly to a geo location using Exchange Online PowerShell

通常,Exchange Online PowerShell 将连接到中心地理位置。Typically, Exchange Online PowerShell will connect to the central geo location. 但你也可以直接连接到附属地理位置。But, you can also connect directly to satellite geo locations. 由于性能有所改进,因此,当你仅管理附属地理位置中的用户时,我们建议直接连接到该位置。Because of performance improvements, we recommend connecting directly to the satellite geo location when you only manage users in that location.

安装和维护 EXO V2 模块中介绍了安装和使用 EXO V2 模块的要求。The requirements for installing and using the EXO V2 module are described in Install and maintain the EXO V2 module.

若要将 Exchange Online PowerShell 连接到特定地理位置 ,ConnectionUri 参数不同于常规连接说明。To connect Exchange Online PowerShell to a specific geo location, the ConnectionUri parameter is different than the regular connection instructions. 命令和值的其余部分是相同的。The rest of the commands and values are the same.

具体而言,需要将值添加到 ?email=<emailaddress> ConnectionUri 值的末尾。Specifically, you need to add the ?email=<emailaddress> value to end of the ConnectionUri value. <emailaddress> 是目标 地理位置 中任何邮箱的电子邮件地址。<emailaddress> is the email address of any mailbox in the target geo location. 您拥有该邮箱的权限或与凭据的关系不是一个因素;电子邮件地址只是告知 Exchange Online PowerShell 连接位置。Your permissions to that mailbox or the relationship to your credentials are not a factor; the email address simply tells Exchange Online PowerShell where to connect.

Microsoft 365 或 Microsoft 365 GCC 客户通常不需要使用 ConnectionUri 参数连接到 Exchange Online PowerShell。Microsoft 365 or Microsoft 365 GCC customers typically don't need to use the ConnectionUri parameter to connect to Exchange Online PowerShell. 但是,若要连接到特定地理位置,你需要使用 ConnectionUri 参数,以便可以在 ?email=<emailaddress> 值中使用它。But, to connect to a specific geo location, you do need to use ConnectionUri parameter so you can use ?email=<emailaddress> in the value.

在 Exchange Online PowerShell 中连接到地理位置Connect to a geo location in Exchange Online PowerShell

以下连接说明适用于已配置或未配置为使用 MFA 身份验证的多重 (帐户) 。The following connection instructions work for accounts that are or aren't configured for multi-factor authentication (MFA).

  1. 在 Windows PowerShell 窗口中,通过运行以下命令加载 EXO V2 模块:In a Windows PowerShell window, load the EXO V2 module by running the following command:

    Import-Module ExchangeOnlineManagement
    
  2. 在下面的示例中,admin@contoso.onmicrosoft.com 是管理员帐户,而目标地理位置是邮箱 olga@contoso.onmicrosoft.com 所在的位置。In the following example, admin@contoso.onmicrosoft.com is the admin account, and the target geo location is where the mailbox olga@contoso.onmicrosoft.com resides.

    Connect-ExchangeOnline -UserPrincipalName admin@contoso.onmicrosoft.com -ConnectionUri https://outlook.office365.com/powershell?email=olga@contoso.onmicrosoft.com
    
  3. 在出现的提示中 admin@contoso.onmicrosoft.com 密码。Enter the password for the admin@contoso.onmicrosoft.com in the prompt that appears. 如果该帐户配置为使用 MFA,则还需要输入安全代码。If the account is configured for MFA, you also need to enter the security code.

查看在 Exchange Online 组织中配置的可用地理位置View the available geo locations that are configured in your Exchange Online organization

若要在 Microsoft 365 多地理位置中查看配置的地理位置的列表,请在 Exchange Online PowerShell 中运行以下命令:To see the list of configured geo locations in Microsoft 365 Multi-Geo, run the following command in Exchange Online PowerShell:

Get-OrganizationConfig | Select -ExpandProperty AllowedMailboxRegions | Format-Table

查看 Exchange Online 组织的中心地理位置View the central geo location for your Exchange Online organization

若要查看租户的中心地理位置,请在 Exchange Online PowerShell 中运行以下命令:To view your tenant's central geo location, run the following command in Exchange Online PowerShell:

Get-OrganizationConfig | Select DefaultMailboxRegion

查找邮箱的地理位置Find the geo location of a mailbox

Exchange Online PowerShell 中的 Get-Mailbox cmdlet 显示邮箱的以下多地理位置相关属性:The Get-Mailbox cmdlet in Exchange Online PowerShell displays the following multi-geo related properties on mailboxes:

  • Database:对地理位置代码对应的数据库名称的前 3 个字母,告知你邮箱当前位于何处。Database: The first 3 letters of the database name correspond to the geo code, which tells you where the mailbox is currently located. 对于在线存档邮箱,应使用 ArchiveDatabase 属性。For Online Archive Mailboxes the ArchiveDatabase property should be used.

  • MailboxRegion:指定管理员设置的地理位置代码(从 Azure AD 中的 PreferredDataLocation 同步)。MailboxRegion: Specifies the geo location code that was set by the admin (synchronized from PreferredDataLocation in Azure AD).

  • MailboxRegionLastUpdateTime:指明 MailboxRegion 的最后(自动或手动)更新时间。MailboxRegionLastUpdateTime: Indicates when MailboxRegion was last updated (either automatically or manually).

若要查看邮箱的这些属性,请使用以下语法:To see these properties for a mailbox, use the following syntax:

Get-Mailbox -Identity <MailboxIdentity> | Format-List Database,MailboxRegion*

例如,若要查看邮箱 chris@contoso.onmicrosoft.com 的地理位置信息,请运行以下命令:For example, to see the geo location information for the mailbox chris@contoso.onmicrosoft.com, run the following command:

Get-Mailbox -Identity chris@contoso.onmicrosoft.com | Format-List Database, MailboxRegion*

此命令的输出如下所示:The output of the command looks like this:

Database                    : EURPR03DG077-db007
MailboxRegion               : EUR
MailboxRegionLastUpdateTime : 2/6/2018 8:21:01 PM

备注

如果数据库名称中的地理位置代码与 MailboxRegion 值不匹配,邮箱将自动放入重定位队列,并移动到 MailboxRegion 值 (Exchange Online 指定的地理位置查找这些属性值) 之间的不匹配。If the geo location code in the database name doesn't match MailboxRegion value, the mailbox will be automatically be put into a relocation queue and moved to the geo location specified by the MailboxRegion value (Exchange Online looks for a mismatch between these property values).

将现有的仅限云邮箱移动到特定地理位置Move an existing cloud-only mailbox to a specific geo location

仅限云的用户是未通过 AAD Connect 同步到租户的用户。A cloud-only user is a user not synchronized to the tenant via AAD Connect. 此用户是在 Azure AD 中直接创建的。This user was created directly in Azure AD. 使用用于 Windows PowerShell 的 Azure AD 模块中的 Get-MsolUserSet-MsolUser cmdlet 来查看或指定将在其中存储仅限云的用户邮箱的地理位置。Use the Get-MsolUser and Set-MsolUser cmdlets in the Azure AD Module for Windows PowerShell to view or specify the geo location where a cloud-only user's mailbox will be stored.

若要查看用户的 PreferredDataLocation 值,请在 Azure AD PowerShell 中使用此语法:To view the PreferredDataLocation value for a user, use this syntax in Azure AD PowerShell:

Get-MsolUser -UserPrincipalName <UserPrincipalName> | Format-List UserPrincipalName,PreferredDataLocation

例如,若要查看用户 michelle@contoso.onmicrosoft.com 的 PreferredDataLocation 值,请运行以下命令:For example, to see the PreferredDataLocation value for the user michelle@contoso.onmicrosoft.com, run the following command:

Get-MsolUser -UserPrincipalName michelle@contoso.onmicrosoft.com | Format-List

若要修改仅限云的用户对象的 PreferredDataLocation 值,请在 Azure AD PowerShell 中使用以下语法:To modify the PreferredDataLocation value for a cloud-only user object, use the following syntax in Azure AD PowerShell:

Set-MsolUser -UserPrincipalName <UserPrincipalName> -PreferredDataLocation <GeoLocationCode>

例如,若要为用户 michelle@contoso.onmicrosoft.com 将 PreferredDataLocation 值设置为欧盟 (EUR) 地理位置,请运行以下命令:For example, to set the PreferredDataLocation value to the European Union (EUR) geo for the user michelle@contoso.onmicrosoft.com, run the following command:

Set-MsolUser -UserPrincipalName michelle@contoso.onmicrosoft.com -PreferredDataLocation EUR

备注

  • 如前所述,您无法对来自本地 Active Directory 的同步用户对象使用此过程。As mentioned previously, you cannot use this procedure for synchronized user objects from on-premises Active Directory. 你需要在 Active Directory 中更改 PreferredDataLocation 值,并使用 AAD Connect 进行同步。You need to change the PreferredDataLocation value in Active Directory and synchronize it using AAD Connect. 有关详细信息,请参阅 Azure Active Directory Connect 同步:为 Microsoft 365 资源配置首选数据位置For more information, see Azure Active Directory Connect sync: Configure preferred data location for Microsoft 365 resources.

  • 将邮箱重定位到新的地理位置所花费的时间取决于若干因素:How long it takes to relocate a mailbox to a new geo location depends on several factors:

    • 邮箱的大小和类型。The size and type of mailbox.
    • 正在移动的邮箱数量。The number of mailboxes being moved.
    • 移动资源的可用性。The availability of move resources.

将非活动邮箱移动到特定地理位置Move an inactive mailbox to a specific geo

不能移动出于合规性目的保留的非活动 (例如,诉讼保留中的邮箱) PreferredDataLocation 值。You can't move inactive mailboxes that are preserved for compliance purposes (for example, mailboxes on Litigation Hold) by changing their PreferredDataLocation value. 若要将非活动邮箱移动到其他地理位置,请执行以下步骤:To move an inactive mailbox to a different geo, do the following steps:

  1. 恢复非活动邮箱。Recover the inactive mailbox. 有关说明,请参阅 恢复非活动邮箱For instructions, see Recover an inactive mailbox.

  2. 通过替换邮箱的名称、别名、帐户或电子邮件地址,并运行 Exchange Online PowerShell 中的以下命令,阻止托管文件夹助理处理恢复 <MailboxIdentity> 的邮箱Prevent the Managed Folder Assistant from processing the recovered mailbox by replacing <MailboxIdentity> with the name, alias, account, or email address of the mailbox and running the following command in Exchange Online PowerShell:

    Set-Mailbox <MailboxIdentity> -ElcProcessingDisabled $true
    
  3. Exchange Online 计划 2 许可证分配给恢复的邮箱。Assign an Exchange Online Plan 2 license to the recovered mailbox. 需要执行此步骤才能将邮箱重新置于诉讼保留状态。This step is required to place the mailbox back on Litigation Hold. 有关说明,请参阅 向用户分配许可证For instructions, see Assign licenses to users.

  4. 如上一节中所述,在邮箱上配置 PreferredDataLocation 值。Configure the PreferredDataLocation value on the mailbox as described in the previous section.

  5. 确认邮箱已移动到新地理位置后,将恢复的邮箱重新置于诉讼保留状态。After you've confirmed that the mailbox has moved to the new geo location, place the recovered mailbox back on Litigation Hold. 有关说明,请参阅将邮箱置于诉讼保留。For instructions, see Place a mailbox on Litigation Hold.

  6. 在确认诉讼保留已就位后,允许托管文件夹助理再次处理邮箱,方法为将邮箱替换为名称、别名、帐户或电子邮件地址,并运行 <MailboxIdentity> Exchange Online PowerShell中的以下命令:After verifying that the Litigation Hold is in place, allow the Managed Folder Assistant to process the mailbox again by replacing <MailboxIdentity> with the name, alias, account, or email address of the mailbox and running the following command in Exchange Online PowerShell:

    Set-Mailbox <MailboxIdentity> -ElcProcessingDisabled $false
    
  7. 通过删除与邮箱关联的用户帐户,使邮箱再次变为非活动状态。Make the mailbox inactive again by removing the user account that's associated with the mailbox. 有关说明,请参阅 从组织中删除用户For instructions, see Delete a user from your organization. 此步骤还针对其他用途发布 Exchange Online 计划 2 许可证。This step also releases the Exchange Online Plan 2 license for other uses.

注意:将非活动邮箱移动到其他地理位置时,可能会影响内容搜索结果或从以前的地理位置搜索邮箱的能力。Note: When you move an inactive mailbox to a different geo location, you might affect content search results or the ability to search the mailbox from the former geo location. 有关详细信息,请参阅在多地理位置 环境中搜索和导出内容For more information, see Searching and exporting content in Multi-Geo environments.

在特定地理位置中创建新的云邮箱Create new cloud mailboxes in a specific geo location

若要在特定地理位置中创建新邮箱,你需要执行以下任一步骤:To create a new mailbox in a specific geo location, you need to do either of these steps:

  • 配置 PreferredDataLocation 值,如前面的在 Exchange Online 中创建邮箱之前将现有的仅云邮箱移动到特定地理位置部分所述。Configure the PreferredDataLocation value as described in the previous Move an existing cloud-only mailbox to a specific geo location section before you create the mailbox in Exchange Online. 例如,在分配许可证之前,在用户上配置 PreferredDataLocation 值。For example, configure the PreferredDataLocation value on a user before you assign a license.

  • 在设置 PreferredDataLocation 值的同时分配许可证。Assign a license at the same time you set the PreferredDataLocation value.

若要在特定地理位置中创建新的仅限云许可用户(未通过 AAD Connect 同步),请在 Azure AD PowerShell 中使用以下语法:To create a new cloud-only licensed user (not AAD Connect synchronized) in a specific geo location, use the following syntax in Azure AD PowerShell:

New-MsolUser -UserPrincipalName <UserPrincipalName> -DisplayName "<Display Name>" [-FirstName <FirstName>] [-LastName <LastName>] [-Password <Password>] [-LicenseAssignment <AccountSkuId>] -PreferredDataLocation <GeoLocationCode>

此示例使用下面的值为 Elizabeth Brunner 创建新用户帐户:This example create a new user account for Elizabeth Brunner with the following values:

  • 用户主体名称:ebrunner@contoso.onmicrosoft.comUser principal name: ebrunner@contoso.onmicrosoft.com
  • 名字:ElizabethFirst name: Elizabeth
  • 姓氏:BrunnerLast name: Brunner
  • 显示名称:Elizabeth BrunnerDisplay name: Elizabeth Brunner
  • 密码: 随机生成,并显示在命令的结果中(因为我们未使用 Password 参数)Password: randomly-generated and shown in the results of the command (because we're not using the Password parameter)
  • 许可证:contoso:ENTERPRISEPREMIUM (E5)License: contoso:ENTERPRISEPREMIUM (E5)
  • 位置:澳大利亚 (AUS)Location: Australia (AUS)
New-MsolUser -UserPrincipalName ebrunner@contoso.onmicrosoft.com -DisplayName "Elizabeth Brunner" -FirstName Elizabeth -LastName Brunner -LicenseAssignment contoso:ENTERPRISEPREMIUM -PreferredDataLocation AUS

有关创建新用户帐户和在 Azure AD PowerShell 中查找 LicenseAssignment 值的详细信息,请参阅使用 PowerShell 创建用户帐户使用 PowerShell 查看许可证和服务For more information about creating new user accounts and finding LicenseAssignment values in Azure AD PowerShell, see Create user accounts with PowerShell and View licenses and services with PowerShell.

备注

如果使用 Exchange Online PowerShell 启用邮箱并需要在 PreferredDataLocation 中所指定的地理位置中直接创建邮箱,你需要直接针对云服务使用诸如 Enable-MailboxNew-Mailbox 等 Exchange Online cmdlet。If you are using Exchange Online PowerShell to enable a mailbox and need the mailbox to be created directly in the geo location that's specified in PreferredDataLocation, you need to use an Exchange Online cmdlet such as Enable-Mailbox or New-Mailbox directly against the cloud service. 如果在本地 Exchange PowerShell 中使用 Enable-RemoteMailbox cmdlet,则会在中心地理位置创建邮箱。If you use the Enable-RemoteMailbox cmdlet in on-premises Exchange PowerShell, the mailbox will be created in the central geo location.

在特定地理位置中载入现有本地邮箱Onboard existing on-premises mailboxes in a specific geo location

你可以使用标准载入工具和流程将邮箱从本地 Exchange 组织迁移到 Exchange Online,这些工具和流程包括 EAC 中的“迁移”仪表板,以及 Exchange Online PowerShell 中的 New-MigrationBatch cmdlet。You can use the standard onboarding tools and processes to migrate a mailbox from an on-premises Exchange organization to Exchange Online, including the Migration dashboard in the EAC, and the New-MigrationBatch cmdlet in Exchange Online PowerShell.

第一步是验证用户对象对于要载入的每个邮箱是否存在,并验证是否在 Azure AD 中配置了正确的 PreferredDataLocation 值。The first step is to verify a user object exists for each mailbox to be onboarded, and verify the correct PreferredDataLocation value is configured in Azure AD. 载入工具将考虑 PreferredDataLocation 值,并将邮箱直接迁移到指定地理位置。The onboarding tools will respect the PreferredDataLocation value and will migrate the mailboxes directly to the specified geo location.

或者,你可以使用以下步骤,通过 Exchange Online PowerShell 中 New-MoveRequest cmdlet 在特定地理位置中直接载入邮箱。Or, you can use the following steps to onboard mailboxes directly in a specific geo location using the New-MoveRequest cmdlet in Exchange Online PowerShell.

  1. 验证用户对象对于要载入的每个邮箱是否存在,并且是否在 Azure AD 中将 PreferredDataLocation 设置为所需的值。Verify the user object exists for each mailbox to be onboarded and that PreferredDataLocation is set to the desired value in Azure AD. PreferredDataLocation 的值将同步到 Exchange Online 中对应邮件用户对象的 MailboxRegion 属性。The value of PreferredDataLocation will be synchronized to the MailboxRegion attribute of the corresponding mail user object in Exchange Online.

  2. 使用本主题前面的连接说明直接连接到特定附属地理位置。Connect directly to the specific satellite geo location using the connection instructions from earlier in this topic.

  3. 在 Exchange Online PowerShell 中,通过运行以下命令,将用于执行邮箱迁移的本地管理员凭据存储在一个变量中:In Exchange Online PowerShell, store the on-premises administrator credentials that's used to perform a mailbox migration in a variable by running the following command:

    $RC = Get-Credential
    
  4. 在 Exchange Online PowerShell 中,创建一个类似于以下示例的新 New-MoveRequestIn Exchange Online PowerShell, create a new New-MoveRequest similar to the following example:

    New-MoveRequest -Remote -RemoteHostName mail.contoso.com -RemoteCredential $RC -Identity user@contoso.com -TargetDeliveryDomain <YourAppropriateDomain>
    
  5. 为需要从本地 Exchange 迁移到当前连接的附属地理位置的每个邮箱重复步骤 4。Repeat step #4 for every mailbox you need to migrate from on-premises Exchange to the satellite geo location you are currently connected to.

  6. 如果需要将其他邮箱迁移到不同的附属地理位置,请为每个特定位置重复步骤 2-4。If you need to migrate additional mailboxes to different satellite geo locations, repeat steps 2 through 4 for each specific location.

多地理位置报告Multi-geo reporting

Microsoft 365 管理中心中的“多地理位置使用情况报告”按地理位置显示用户计数。Multi-Geo Usage Reports in the Microsoft 365 admin center displays the user count by geo location. 该报告显示当前月份的用户分布,并提供过去 6 个月的历史数据。The report displays user distribution for the current month and provides historical data for the past 6 months.

另请参阅See also

使用 PowerShell 管理 Microsoft 365Manage Microsoft 365 with PowerShell