驗證 Microsoft Entra 混合式聯結

本文說明三種尋找及驗證已使用 Microsoft Entra 混合式而連結的裝置狀態之方法。

必要條件

在本機裝置上

執行下列步驟:

  1. 請開啟 Windows PowerShell。

  2. 輸入 dsregcmd /status

  3. 確認 AzureAdJoinedDomainJoined 都設定為 [是]

  4. 您可以使用 DeviceId,並使用 Microsoft Entra 系統管理中心或 PowerShell 來比較服務的狀態。

    若為舊版裝置,請參閱針對已加入混合式 Microsoft Entra 下層裝置進行疑難排解一文

使用 Microsoft Entra 系統管理中心

執行下列步驟:

  1. 以不低於 [雲端裝置管理員] 的身分登入 [Microsoft Entra 系統管理中心]

  2. 瀏覽至 [身分識別] > [裝置] > [所有裝置]

  3. 如果 [已註冊] 資料行顯示為擱置中,表示已加入混合式 Microsoft Entra 尚未完成。 在同盟環境中,只有在無法註冊且 Microsoft Entra Connect 設定為同步裝置時,才會發生這種情況。 等候 Microsoft Entra Connect 完成同步週期。

  4. 如果 [已註冊] 資料行包含日期/時間,表示已加入混合式 Microsoft Entra 已完成。

使用 PowerShell

請使用 Get-MgDevice (英文) 確認 Azure 租用戶中的裝置註冊狀態。 此 Cmdlet 位於 Microsoft Graph PowerShell SDK (英文) 中。

使用 Get-MgDevice Cmdlet 來檢查服務詳細資料時:

  • 必須要有裝置識別碼與 Windows 用戶端上的識別碼相符的物件存在。
  • DeviceTrustType 的值是 [已加入網域]。 此設定相當於 Microsoft Entra 系統管理中心 [裝置] 頁面上的 [已加入混合式 Microsoft Entra] 狀態。
  • 在條件式存取中使用的裝置,[Enabled] 的值是 [True],而 [DeviceTrustLevel] 是 [Managed]
  1. 以系統管理員身分開啟 Windows PowerShell。

  2. 輸入 Connect-MgGraph (英文) 以連線至您的 Azure 租用戶。

    計算所有已加入混合式 Microsoft Entra 的裝置 (不包括 [擱置] 狀態)

    (Get-MgDevice -All | where {($_.TrustType -eq 'ServerAd') -and ($_.ProfileType -eq 'RegisteredDevice')}).count
    

    計算所有已加入混合式 Microsoft Entra 的裝置 (包含 [擱置] 狀態)

    (Get-MgDevice -All | where {($_.TrustType -eq 'ServerAd') -and ($_.ProfileType -ne 'RegisteredDevice')}).count
    

    列出所有已加入混合式 Microsoft Entra 裝置

    Get-MgDevice -All | where {($_.TrustType -eq 'ServerAd') -and ($_.ProfileType -eq 'RegisteredDevice')}
    

    列出所有已加入混合式 Microsoft Entra 的裝置 (包含 [擱置] 狀態)

    Get-MgDevice -All | where {($_.TrustType -eq 'ServerAd') -and ($_.ProfileType -ne 'RegisteredDevice')}
    

    列出單一裝置的詳細資料:

    1. 輸入下列命令。 在裝置本機取得裝置識別碼。
    $Device = Get-MgDevice -DeviceId <ObjectId>
    
    1. 確認 AccountEnabled 設為 True
    $Device.AccountEnabled