共用方式為


User-driven Microsoft Entra hybrid join: Install the Intune Connector for Active Directory

Windows Autopilot 使用者驅動的 Microsoft Entra 混合連接步驟:

  • 步驟 2:安裝 Active Directory 的 Intune 連接器

關於 Windows Autopilot 使用者驅動的 Microsoft Entra 混合連接工作流程概述,請參閱 Windows Autopilot 使用者驅動的 Microsoft Entra 混合連接總覽

注意事項

如果 Active Directory 的 Intune 連接器已經安裝並設定好,請跳過此步驟,直接進入第三步:提高組織單位 (OU) 的電腦帳戶限制

安裝 Active Directory 的 Intune 連接器

Active Directory 的 Intune 連接器,也稱為離線網域加入 (ODJ) 連接器,會在 Windows Autopilot 過程中將電腦連接到本地網域。 連接器會在指定的組織單位 (OU) 於網域加入過程中建立電腦物件。

重要事項

從 Intune 2501 起,Active Directory 的 Intune 連接器會更新並透過管理服務帳號 (MSA) ,遵循最小權限原則來提升安全性。 當你從 Intune 下載連接器時,你會自動獲得更新版本。

已淘汰的舊有連接器仍然可用,且很快將停止接受註冊申請。 如果你還在用舊有連接器,請立即更新以避免功能損失。 欲了解更多資訊,請參閱 Intune 連接器與 Windows Autopilot 混合型 Microsoft Entra 加入部署的 Active Directory 低權限帳號相關部落格文章。

要更新連接器,您必須:

  1. 手動卸載舊有連接器。 沒有自動選項。
  2. 下載並安裝本文所述更新 (連接器) 。

提示

如果使用多個網域來註冊 Autopilot 裝置:

  • 你需要為每個網域建立獨立的連接器實例。 連接器只能處理與其安裝伺服器相同網域的註冊請求。
  • 每台伺服器最多只能有一個連接器 (虛擬機或實體) 。 每個網域可設置額外伺服器以維持冗餘,每台伺服器都安裝自己的連接器。 在這種設定中,如果一個連接器故障,請求會轉到同一網域內另一台伺服器上的另一個連接器。

選擇對應安裝中 Intune Connector for Active Directory 版本的分頁:

開始之前

關閉 Internet Explorer 強化安全設定

版本 6.2504.2001.8 開始,更新後的 Intune Connector for Active Directory 改用基於 Microsoft Edge 的 WebView2,取代以 Microsoft Internet Explorer 為基礎的 WebBrowser。 此變更表示 Windows Server 中的 Internet Explorer 加強安全設定不再需要關閉。 請務必安裝 Intune Connector for Active Directory 版本 6.2504.2001.8 或更新版本,以避免 Internet Explorer 強化安全設定的問題。

下載 Intune Connector for Active Directory

  1. 在安裝 Intune Connector for Active Directory 的伺服器上,登入 Microsoft Intune 管理中心

  2. 畫面,選擇左側窗格的 裝置

  3. 裝置中 |總覽 畫面,在 依平台分類,選擇 Windows

  4. Windows |Windows 裝置 畫面,在 裝置啟動中選擇 註冊

  5. Windows |Windows 註冊畫面,在 Windows Autopilot 下,選擇 Active Directory 的 Intune 連接器

  6. Intune Connector for Active Directory 畫面中,選擇新增

  7. 在開啟的新增連接器視窗中,於「設定 Active Directory 的 Intune 連接器」中,選擇下載本地的 Intune Connector for Active Directory。 該連結下載了一個名為 ODJConnectorBootstrapper.exe.

在伺服器上安裝 Active Directory 的 Intune 連接器

重要事項

Intune Connector for Active Directory 安裝必須使用擁有以下網域權限的帳號:

  • 必要 - 在 Managed Service Accounts 容器中建立 msDs-ManagedServiceAccount 物件。
  • 可選 - 修改 Active Directory 中 OU 權限 - 若安裝更新版 Intune Connector for Active Directory 的管理員沒有此權限,擁有這些權限的管理員需進行額外設定步驟。 欲了解更多資訊,請參閱 組織單位中的「增加電腦帳戶限制」步驟/章節。
  1. 請以擁有本地管理員權限的帳號登入安裝 Intune Connector for Active Directory 的伺服器。

  2. 如果安裝了先前的舊版 Intune Connector for Active Directory,請先卸載該裝置,再安裝更新版 Intune Connector for Active Directory。 欲了解更多資訊,請參閱「移除 Active Directory 的 Intune 連接器」。

    重要事項

    在卸載先前的舊版 Intune Connector for Active Directory 時,務必在卸載過程中執行舊版 Intune Connector for Active Directory 安裝程式。 如果舊版 Intune Connector for Active Directory 安裝程式在執行時提示要卸載,請選擇卸載它。 此步驟確保先前的舊有 Intune Connector for Active Directory 被完全卸載。 舊版的 Intune Connector for Active Directory 安裝程式可從 Intune Connector for Active Directory 下載。

    提示

    在只有單一 Intune Connector for Active Directory 的網域中,Microsoft 建議先在另一台伺服器安裝更新版的 Intune Connector for Active Directory。 在移除現有伺服器上舊有的 Intune Connector for Active Directory 之前,應該先在另一台伺服器安裝更新版 Intune Connector for Active Directory 。 先安裝 Active Directory 的 Intune 連接器,可以避免在現有伺服器更新 Intune Connector for Active Directory 時出現任何停機。

  3. 打開ODJConnectorBootstrapper.exe已下載的檔案,啟動 Intune 連接器用於 Active Directory 設定安裝。

  4. 透過 Intune 連接器安裝 Active Directory 設定

  5. 安裝結束時,選擇「啟動 Intune 連接器用於 Active Directory」的勾選框。

    注意事項

    如果 Intune Connector for Active Directory 設定安裝在未勾選「啟動 Intune Connector for Active Directory 」勾選框下不小心關閉,則可選擇「Intune Connector for Active Directory Intune」重新開啟 Intune Connector for Active Directory > 設定開始選單中的 Active Directory 連接器。

登入 Intune Connector for Active Directory

  1. Intune Connector for Active Directory 視窗中,註冊標籤下選擇登入

  2. 「登入」標籤下,請以 Intune 管理員角色的 Microsoft Entra ID 憑證登入。 使用者帳號必須擁有指定的 Intune 授權。 登入流程可能需要幾分鐘完成。

    注意事項

    用於註冊 Intune Connector for Active Directory 的帳號僅在安裝時為臨時需求。 伺服器註冊後,帳號不會再被使用。

  3. 登入完成後:

    1. Intune Connector for Active Directory 成功註冊確認視窗會出現。 選擇 確定 以關閉視窗。
    2. 一個名為「的管理服務帳戶」<MSA_name>」已成功設定, 確認視窗出現。 MSA 的名稱 msaODJ##### 格式為 ,其中 ##### 是五個隨機字元。 標記所建立的 MSA 名稱,然後選擇 確定 關閉視窗。 MSA 名稱可能日後需要用來設定 MSA,以允許在 OU 中建立電腦物件。
  4. 註冊標籤顯示 Intune Connector for Active Directory 已註冊登入按鈕是灰色的,且「設定管理服務帳號」已啟用。

  5. 關閉 Active Directory 視窗的 Intune 連接器

確認 Intune Connector for Active Directory 是否啟用

驗證完成後,Intune Connector for Active Directory 的安裝完成。 安裝完成後,請依照以下步驟確認它在 Intune 中是否已啟用:

  1. 如果管理中心還開著,可以去 Microsoft Intune 管理中心看看。 如果新增 連接器 視窗還在顯示,請關閉它。

    如果 Microsoft Intune 管理中心還沒開:

    1. 登入 Microsoft Intune 系統管理中心

    2. 畫面,選擇左側窗格的 裝置

    3. 裝置中 |總覽 畫面,在 依平台分類,選擇 Windows

    4. Windows |Windows 裝置 畫面,在 裝置啟動中選擇 註冊

    5. Windows |Windows 註冊畫面,在 Windows Autopilot 下,選擇 Active Directory 的 Intune 連接器

  2. Intune Connector for Active Directory 頁面中:

    • 確認伺服器顯示在連接器名稱下,並在狀態中顯示為活躍
    • 對於更新版的 Intune Connector for Active Directory,請確保版本大於或等於 6.2501.2000.5

    如果伺服器未顯示,請選擇重新整理或離開該頁面,然後再回到 Intune Connector for Active Directory 頁面。

注意事項

  • 新註冊的伺服器可能需要數分鐘才會出現在 Microsoft Intune 管理中心Intune Connector for Active Directory 頁面。 註冊伺服器只有在能成功與 Intune 服務通訊時才會出現。

  • Active Directory 的 Intune 連接器仍會出現在 Intune Connector for Active Directory 頁面,並會在 30 天後自動清理。

安裝 Active Directory 的 Intune 連接器後,會開始在事件檢視器中,透過路徑「MicrosoftIntuneODJConnectorService>」的應用程式與服務日誌>>進行登錄。 在此路徑下,可以找到管理員營運日誌。

設定 MSA 允許在 OU 中建立物件 (選擇性)

預設情況下,MSA 只能在 Computers 容器中建立電腦物件。 MSA 無法在組織單位 (組織單位) 建立電腦物件。 為了讓 MSA 能在 OU 中建立物件,這些 OU 必須加入ODJConnectorEnrollmentWizard.exe.config安裝 Intune Connector for Active Directory 的目錄中的 XML 檔案ODJConnectorEnrollmentWizard,通常為 C:\Program Files\Microsoft Intune\ODJConnector\

要設定 MSA 允許在 OU 中建立物件,請遵循以下步驟:

  1. 在安裝 Intune Connector for Active Directory 的伺服器上,導覽至 ODJConnectorEnrollmentWizard Intune Connector for Active Directory 安裝的目錄,通常是 C:\Program Files\Microsoft Intune\ODJConnector\

  2. 在目錄中ODJConnectorEnrollmentWizard,請用文字編輯器(例如記事本)開啟現有ODJConnectorEnrollmentWizard.exe.config的 XML 檔案。

  3. add key XML 檔案的元素 ODJConnectorEnrollmentWizard.exe.config 中:

    • value=旁邊,加入 MSA 應該有權限建立電腦物件的 OU。
    • OU 名稱必須採用 LDAP 的區別名稱 格式,若適用,則需轉義。
    • 多個 OU 可透過分號分隔 (;) 來支援。
    • 請務必保留 (」) 旁邊 value=的引號。 所有OU的數值必須都在一對報價內。
    • 不要更改關鍵元素 OrganizationalUnitsUsedForOfflineDomainJoin的名稱。

    以下範例是一個包含多個 OU 的 LDAP 區分名稱格式的 XML 條目範例:

      <appSettings>
    
        <!-- Semicolon separated list of OUs that will be used for Hybrid Autopilot, using LDAP distinguished name format.
            The ODJ Connector will only have permission to create computer objects in these OUs.
            The value here should be the same as the value in the Hybrid Autopilot configuration profile in the Azure portal - https://learn.microsoft.com/en-us/mem/intune/configuration/domain-join-configure
    
            Usage example (NOTE: PLEASE ENSURE THAT THE DISTINGUISHED NAME IS ESCAPED PROPERLY):
            Domain contains the following OUs:
              - OU=HybridDevices,DC=contoso,DC=com
              - OU=HybridDevices2,OU=IntermediateOU,OU=TopLevelOU,DC=contoso,DC=com
    
            Value: "OU=HybridDevices,DC=contoso,DC=com;OU=HybridDevices2,OU=IntermediateOU,OU=TopLevelOU,DC=contoso,DC=com" -->
    
        <add key="OrganizationalUnitsUsedForOfflineDomainJoin" value="OU=SubOU,OU=TopLevelOU,DC=contoso,DC=com;OU=Mine,DC=contoso,DC=com" />
      </appSettings>
    

    提示

    在範例中,將旁邊 value= 的紅色範例文字替換為組織的 LDAP 區分名稱格式的組織。 如範例所示,確保所有 OU 條目都在引號 (“) 內,且每個 OU 都以分號分隔 (;) 。

  4. 當所有想要的 OU 都加入後,儲存 ODJConnectorEnrollmentWizard.exe.config XML 檔案。

  5. 作為擁有適當權限修改 OU 權限的管理員Intune,請從開始選單中進入 Active Directory > 連接器Intune Intune Active Directory 連接器。

    重要事項

    如果安裝並設定 Intune Connector for Active Directory 的管理員沒有修改 OU 權限的權限,那麼在組織單位中「增加電腦帳號限制」的章節/步驟,應該由有權限修改 OU 權限的管理員來執行。

  6. Intune Connector for Active Directory 視窗的註冊標籤中,選擇「配置管理服務帳號」。

  7. 一個 名為「<MSA_name>」的管理服務帳戶已成功設置, 並出現確認視窗。 選擇 確定 以關閉視窗。

使用自訂的管理服務帳號 (可選)

你可以選擇性地設定連接器使用你自己的管理服務帳號,而不是由連接器自動設定的 MSA。

MSA 要求

本節說明MSA的要求。

  • 所提供的帳號必須是具有 Active Directory 中以下任一物件類別的服務帳號:

    • CN=ms-DS-Group-Managed-Service-Account,CN=Schema,CN=Configuration,DC=contoso,DC=com

    • CN=ms-DS-Managed-Service-Account,CN=Schema,CN=Configuration,DC=contoso,DC=com

  • 服務帳號的設定值格式需為以下格式: <msaAccountName@domain>

  • 服務帳號必須與 ODJ 連接器的伺服器存在於同一網域。

  • 服務帳號需要安裝在承載 ODJ 連接器的伺服器上。 欲了解更多資訊,請參閱 Install-ADServiceAccount

    • 如果使用 sMSA,帳號只能連結到單一機器。
    • 如果使用 gMSA,安裝 gMSA 的伺服器必須能存取密碼。
  • 服務帳號需要有本地的 「以服務登入」 權限,這可以直接設定,也可以透過群組成員設定。 更多資訊請參閱 啟用服務登入

  • 服務帳號建立混合 Autopilot 流程電腦物件的權限需手動授予。 欲了解更多資訊,請參閱 組織單位 (OU) 提高電腦帳戶上限

如何設定

更新 ODJConnectorEnrollmentWizard.exe.config。 其預設位置為 C:\Program Files\Microsoft Intune\ODJConnector\ODJConnectorEnrollmentWizard

  1. 在檔案的 appSettings 區塊 ,新增以下一行: <add key="TenantConfiguredManagedServiceAccount" value="{accountname}" />
  2. 登入連接器。
停用 OU 更新

使用你自己的 MSA 會讓連接器無法進行任何 OU 更新,無論在 OrganizationalUnitsUsedForOfflineDomain Join 中設定了什麼。 為防止錯誤,請透過 ODJConnectorEnrollmentWizard.exe.config更新 來停用 OU 更新。 其預設位置為 C:\Program Files\Microsoft Intune\ODJConnector\ODJConnectorEnrollmentWizard

  1. 在檔案的 appSettings 區塊 ,新增以下一行: <add key="DisableOUUpdates" value="true" />
  2. 登入連接器。

下一步:提高組織單位 (OU 的電腦帳戶上限)