Courseiva
Manage and maintain devices →mediumMultiple Choice

MD-102 Manage and maintain devices Practice Question

Exhibit

{
  "exhibit": "PowerShell command: Get-MgDeviceManagementManagedDevice -Filter \"operatingSystem eq 'Windows'\" | Select-Object id, deviceName, lastSyncDateTime, complianceState"}

Refer to the exhibit. You run this PowerShell command using the Microsoft Graph PowerShell SDK. What is the primary purpose of this command?

⚠ Common exam trap

It's easy for candidates to assume the command only returns non-compliant devices because complianceState is selected, but the filter does not restrict by compliance value—it merely includes that property in the output.

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

✓

To retrieve a list of all Windows managed devices with their compliance status.

The PowerShell command uses `Get-MgDeviceManagementManagedDevice` with a filter for `operatingSystem eq 'Windows'` and selects properties including `complianceState`. This retrieves all Windows managed devices and their compliance status, making option D correct. The command does not filter by compliance state, so it returns both compliant and non-compliant devices, and it does not enforce any compliance action.

Answer analysis

Option-by-option breakdown

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

  • ✗

    To list only non-compliant Windows devices.

    Why it's wrong here

    The command filters devices by compliance state, not by non-compliance alone; it returns all managed devices matching the query. It tempts because compliance filtering is a common Graph task, but the specific filter parameter determines the actual returned set.

  • ✗

    To retrieve all managed devices regardless of operating system.

    Why it's wrong here

    The command scopes results to Windows devices via the operating system filter, so non-Windows managed devices are excluded. It tempts because 'managed devices' sounds OS-agnostic, but the filter parameter narrows the returned set to a single platform.

  • ✗

    To enforce compliance on Windows devices.

    Why it's wrong here

    Graph PowerShell read commands retrieve device objects; they do not push compliance policies or trigger remediation actions. It tempts because compliance appears in the query filter, but enforcement requires Intune policy assignment, not a GET request.

  • ✓

    To retrieve a list of all Windows managed devices with their compliance status.

    Why this is correct

    The Graph SDK cmdlet queries managedDevices filtered by operating system, returning each Windows device alongside its complianceState property. This satisfies the stem's aim of listing all Windows managed devices together with their current compliance status.

About these practice questions

This MD-102 question is part of Courseiva's 556-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.