Courseiva
Manage and maintain devicesmediumMultiple ChoiceObjective-mapped

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

    Incorrect. No filter for complianceState.

  • To retrieve all managed devices regardless of operating system.

    Why it's wrong here

    Incorrect. The command filters for Windows.

  • To enforce compliance on Windows devices.

    Why it's wrong here

    Incorrect. The command only retrieves data.

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

    Why this is correct

    Correct. The command selects complianceState for Windows devices.

About these practice questions

This MD-102 question is part of Courseiva's 942-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.