來自 Office 365 混合式設定向導的錯誤:物件未設定為物件的實例

原始 KB 編號:  4051381

徵狀

當您在 Exchange Server 2016 累計更新7已安裝之後執行 Microsoft Office 365 混合式設定向導時,該嚮導執行失敗,並報告 Set-FederatedOrganizationIdentifier Cmdlet 會傳回錯誤「未將物件參照設定為物件的實例。」

此郵件是寫入混合式設定向導記錄檔的下列完整錯誤訊息的一部分:

017.10.23 11:39:51.552         10276 [Client=UX, Activity=Domain Ownership, Session=OnPremises, Cmdlet=Set-FederatedOrganizationIdentifier, Thread=9] START Set-FederatedOrganizationIdentifier -AccountNamespace 'contoso.com' -DelegationFederationTrust 'Microsoft Federation Gateway' -Enabled: $true -DefaultDomain $null
2017.10.23 11:39:57.693 *ERROR* 10277 [Client=UX, Activity=Domain Ownership, Session=OnPremises, Cmdlet=Set-FederatedOrganizationIdentifier, Thread=9] FINISH Time=6140.9ms Results=PowerShell failed to invoke 'Set-FederatedOrganizationIdentifier': Object reference not set to an instance of an object. An unexpected error has occurred and a Watson dump is being generated: Object reference not set to an instance of an object.
2017.10.23 11:39:57.756 *ERROR* 10224 [Client=UX, Page=DomainProof, Thread=9] Microsoft.Online.CSE.Hybrid.PowerShell.PowerShellInvokeException: PowerShell failed to invoke 'Set-FederatedOrganizationIdentifier': Object reference not set to an instance of an object. An unexpected error has occurred and a Watson dump is being generated: Object reference not set to an instance of an object. ---> System.Management.Automation.RemoteException: Object reference not set to an instance of an object.
                                   at System.Management.Automation.Runspaces.AsyncResult.EndInvoke()
                                   at System.Management.Automation.PowerShell.EndInvoke(IAsyncResult asyncResult)
                                   at Microsoft.Online.CSE.Hybrid.Provider.PowerShell.PowerShellProvider.PowerShellInstance.Invoke(String cmdlet, IReadOnlyDictionary`2 parameters, Int32 millisecondsTimeout)
                                   --- End of inner exception stack trace ---
                                   at Microsoft.Online.CSE.Hybrid.PowerShell.RemotePowershellSession.RunCommandInternal(Cmdlet cmdlet, SessionParameters parameters, Int32 millisecondsTimeout, PowerShellRetrySettings retrySettings, Boolean skipCmdletLogging)
                                   at Microsoft.Online.CSE.Hybrid.Session.PowerShellOnPremisesSession.SetFederatedOrganizationIdentifier(SmtpDomain accountNamespace, String delegationTrustLink, SmtpDomain defaultDomain)
                                   at Microsoft.Online.CSE.Hybrid.App.ViewModel.Pages.DomainProof.DomainInfo.AddFederatedDomain(IOnPremisesSession session, AppData appData)
                                   at System.Collections.Generic.List`1.ForEach(Action`1 action)
                                   at Microsoft.Online.CSE.Hybrid.App.ViewModel.Pages.DomainProof.VerifyActivity(IOnPremisesSession session, EnvironmentBase environment)

如果您直接從 Exchange 管理命令介面執行 Cmdlet,您可能會遇到下列類似錯誤:

[PS] C:\>Set-FederatedOrganizationIdentifier -AccountNamespace 'contoso.com' -DelegationFederationTrust 'Microsoft Federation Gateway' -Enabled: $true -DefaultDomain $null

WARNING: An unexpected error has occurred and a Watson dump is being generated: Object reference not set to an instance
of an object.
Object reference not set to an instance of an object.
    + CategoryInfo          : NotSpecified: (:) [Set-FederatedOrganizationIdentifier], NullReferenceException
    + FullyQualifiedErrorId : System.NullReferenceException,Microsoft.Exchange.Management.SystemConfigurationTasks.Set
   FederatedOrganizationIdentifier
    + PSComputerName        : server.contoso.com

解決方法1

如果您的網域中有第二個 Exchange 伺服器執行 Exchange Server 2010、Exchange Server 2013 或 Exchange Server 2016 累計更新6或更早版本,請使用此方法。

  1. 將 Exchange 管理命令介面連線至第二部 Exchange 伺服器,並執行下列 Cmdlet:

    Set-FederatedOrganizationIdentifier -AccountNamespace '<AccountNameSpace>' -DelegationFederationTrust 'Microsoft Federation Gateway' -Enabled: $true -DefaultDomain $null
    
  2. 成功完成 Cmdlet 後,請在 Exchange Server 2016 累計更新7上執行 Microsoft Office 365 混合式設定向導。

解決方法2

請聯繫 Microsoft 支援部門以要求包含此問題修正的過渡更新複本。 此修正會包含在 Exchange Server 2016 累計更新8中。

狀態

Microsoft 已確認這是 Exchange Server 2016 累計更新7中的已知問題。