本文說明尋找及驗證Microsoft已加入混合式裝置狀態的三種方式。
必要條件
無
在裝置上本機
請遵循下列步驟:
開啟 Windows PowerShell。
輸入
dsregcmd /status
。確認 AzureAdJoined 和 DomainJoined 都設定為 [是]。
您可以使用 DeviceId ,並使用 Microsoft Entra 系統管理中心或 PowerShell 來比較服務的狀態。
使用 Microsoft Entra 系統管理中心
請遵循下列步驟:
使用 PowerShell
使用 Get-MgDevice 確認 Azure 租使用者中的裝置註冊狀態。 此 Cmdlet 位於 Microsoft Graph PowerShell SDK 中。
當您使用 Get-MgDevice Cmdlet 來檢查服務詳細資料時:
- 具有符合 Windows 用戶端識別碼之 裝置 識別碼的對象必須存在。
- DeviceTrustType 的值是已加入網域。 此設定相當於 Microsoft Entra 系統管理中心 [裝置] 頁面上的 [Microsoft Entra 混合式聯結狀態。
- 針對條件式存取中使用的裝置, Enabled 的值為 True , 且 DeviceTrustLevel 為 Managed。
以系統管理員身分開啟 Windows PowerShell。
輸入 Connect-MgGraph 以連線到您的 Azure 租使用者。
計算所有Microsoft Entra 混合式聯結裝置 (不包括 擱置 狀態)
(Get-MgDevice -All | where {($_.TrustType -eq 'ServerAd') -and ($_.ProfileType -eq 'RegisteredDevice')}).count
計算所有具有 擱 置狀態的已加入混合式裝置Microsoft
(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具有 擱 置狀態的已加入混合式裝置
Get-MgDevice -All | where {($_.TrustType -eq 'ServerAd') -and ($_.ProfileType -ne 'RegisteredDevice')}
列出單一裝置的詳細資料:
- 輸入下列命令。 在裝置本機取得裝置標識碼。
$Device = Get-MgDevice -DeviceId <ObjectId>
- 確認
AccountEnabled
設定為True
。
$Device.AccountEnabled