確認 Microsoft Entra 混合式聯結

本文說明尋找及驗證 Microsoft Entra 混合式已加入裝置狀態的三種方式。

必要條件

在裝置上本機

執行下列步驟:

  1. 開啟 [Windows PowerShell] 。

  2. 輸入 dsregcmd /status

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

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

    如需舊版裝置,請參閱針對已加入下層裝置的 Microsoft Entra 混合式裝置進行疑難解答一文

使用 Microsoft Entra 系統管理中心

執行下列步驟:

  1. 以至少雲端裝置 管理員 istrator 身分登入 Microsoft Entra 系統管理中心

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

  3. 如果 [已註冊] 數據行顯示 [擱置],則 Microsoft Entra 混合式聯結尚未完成。 在同盟環境中,只有在無法註冊且 Microsoft Entra 連線 設定為同步處理裝置時,才會發生此狀態。 等候 Microsoft Entra 連線 完成同步處理週期。

  4. 如果已註冊的數據行包含日期/時間,則 Microsoft Entra 混合式聯結已完成。

使用 PowerShell

使用 Get-MgDevice 確認 Azure 租使用者中的裝置註冊狀態。 此 Cmdlet 位於 Microsoft Graph PowerShell SDK 中。

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

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

  2. 輸入 連線-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