Courseiva
Prepare infrastructure for devicesmediumMultiple ChoiceObjective-mapped

MD-102 Prepare infrastructure for devices Practice Question

Exhibit

Refer to the exhibit.

Get-MgDeviceManagementManagedDevice -Filter "operatingSystem eq 'Windows'" | Select-Object Id, DeviceName, LastSyncDateTime, ComplianceState

Id                                   DeviceName   LastSyncDateTime        ComplianceState
--                                   ----------   ----------------        ---------------
12345678-1234-1234-1234-123456789abc Laptop-01    2025-03-15T10:30:00Z    compliant
87654321-4321-4321-4321-123456789abc Laptop-02    2025-03-14T09:15:00Z    noncompliant
11223344-5566-7788-99aa-bbccddeeff00 Laptop-03    2025-03-10T08:00:00Z    compliant

Refer to the exhibit. You run the PowerShell cmdlet shown and get the output. You need to investigate why Laptop-02 is non-compliant. Which additional cmdlet should you run to get the non-compliance reasons?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Get-MgDeviceManagementManagedDeviceCompliancePolicyState -ManagedDeviceId 87654321-4321-4321-4321-123456789abc

Get-MgDeviceManagementManagedDeviceCompliancePolicyState retrieves the compliance policy state for a specific managed device, including the non-compliance reasons. This cmdlet returns compliance policy state details per device, which allows you to investigate why Laptop-02 is non-compliant. Option B is incorrect because Get-MgDeviceManagementDeviceCompliancePolicySettingStateSummary provides a summary of settings across devices, not per-device reasons. Option C is incorrect because Get-MgDeviceManagementManagedDeviceConfigurationState retrieves device configuration state, not compliance policy state. Option D is incorrect because Get-MgDeviceManagementDeviceConfigurationState retrieves device configuration state, not compliance reasons.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Get-MgDeviceManagementManagedDeviceCompliancePolicyState -ManagedDeviceId 87654321-4321-4321-4321-123456789abc

    Why this is correct

    Correct. This cmdlet retrieves the compliance policy state and reasons for a specific device, allowing you to see why Laptop-02 is non-compliant.

  • Get-MgDeviceManagementDeviceCompliancePolicySettingStateSummary -DeviceCompliancePolicyId <id>

    Why it's wrong here

    Incorrect. This cmdlet summarizes setting states across devices, not per-device compliance reasons.

  • Get-MgDeviceManagementManagedDeviceConfigurationState -ManagedDeviceId 87654321-4321-4321-4321-123456789abc

    Why it's wrong here

    Incorrect. This cmdlet retrieves configuration state, not compliance policy state.

  • Get-MgDeviceManagementDeviceConfigurationState -ManagedDeviceId 87654321-4321-4321-4321-123456789abc

    Why it's wrong here

    Incorrect. This cmdlet retrieves device configuration states, not compliance reasons.

About these practice questions

One of 942 original MD-102 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This MD-102 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the MD-102 exam.