Courseiva
Protect devicesmediumMultiple ChoiceObjective-mapped

MD-102 Protect devices Practice Question

Exhibit

Refer to the exhibit.

```powershell
Get-MgDeviceManagementManagedDevice -Filter "operatingSystem eq 'Windows'" |
  Where-Object {$_.complianceState -eq 'noncompliant'} |
  Select-Object id, deviceName, complianceState
```

Refer to the exhibit. An administrator runs this PowerShell command using the Microsoft Graph PowerShell SDK. The output returns no devices. However, the administrator knows that there are non-compliant Windows devices in Intune. What is the most likely reason?

⚠ Common exam trap

Test-takers frequently assume a filter returning no results means the filter syntax is wrong or permissions are missing, when in fact the default page size truncation silently hides matching devices that exist on subsequent pages.

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

The cmdlet requires the -All parameter to return all devices.

The Get-MgDeviceManagementManagedDevice cmdlet from the Microsoft Graph PowerShell SDK, by default, returns only the first 100 devices. When a filter is applied and no devices are returned despite known non-compliant devices existing, the most common cause is that the result set is truncated. Adding the -All parameter forces the cmdlet to page through all results and return the complete set of devices, including those that match the filter.

Answer analysis

Option-by-option breakdown

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

  • The filter string is case-sensitive and should be 'windows' in lowercase.

    Why it's wrong here

    The filter is case-insensitive.

  • The cmdlet requires the -All parameter to return all devices.

    Why this is correct

    Without -All, the cmdlet may only return a subset.

  • The -Filter parameter is not supported for this cmdlet.

    Why it's wrong here

    The -Filter parameter is supported.

  • The admin does not have the required permissions to read device compliance.

    Why it's wrong here

    Would return an error, not empty.

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.