MD-102 Protect devices Practice Question
Exhibit
Refer to the exhibit.
$devices = Get-MgDeviceManagementManagedDevice
foreach ($device in $devices) {
if ($device.DeviceType -eq 'WindowsRT' -or $device.DeviceType -eq 'WindowsMobile') {
Write-Output "Device $($device.DeviceName) is not supported for compliance."
}
}Refer to the exhibit. You run this PowerShell script using the Microsoft Graph PowerShell SDK. What is the purpose of this script?
⚠ Common exam trap
A common mix-up: candidates confuse 'checking compliance status' (which evaluates policy adherence) with 'identifying OS support for compliance policies' (which checks if the device can even be targeted by a policy), leading them to select option A instead of D.
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 identify devices that are not supported for compliance policies.
The script uses the `Get-MgDeviceManagementManagedDevice` cmdlet to retrieve all managed devices from Intune, then filters for devices where the `operatingSystem` property is not in the list of supported OS versions for compliance policies (e.g., Windows 10/11, iOS, Android, macOS). The output identifies devices that are unsupported for compliance policies, which aligns with option D. It does not check compliance status, enroll devices, or remove them.
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 check compliance status of devices.
Why it's wrong here
The script does not evaluate compliance.
- ✗
To enroll devices in Intune.
Why it's wrong here
The script does not enroll.
- ✗
To remove unsupported devices from Intune.
Why it's wrong here
The script only writes output, it does not delete.
- ✓
To identify devices that are not supported for compliance policies.
Why this is correct
The script flags Windows RT and Windows Mobile devices.
Go deeper
Related to this question
Learn chapter
Introduction to Endpoint Management in Microsoft 365
Key term
Compliance
Compliance is the process of ensuring that an organization follows laws, regulations, standards, and internal policies that apply to its operations and data handling.
Key term
Intune
Microsoft Intune is a cloud-based service that helps organizations manage their users' devices and applications, ensuring security and compliance without needing to own or control the physical hardware.
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 →
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.