Courseiva
Manage and maintain deviceshardMultiple ChoiceObjective-mapped

MD-102 Manage and maintain devices Practice Question

Your organization uses Microsoft Intune to manage Windows 10 devices. You need to deploy a PowerShell script that runs during the device provisioning process, before the user signs in. The script should be assigned to a device group containing all Autopilot devices. Which method should you use?

⚠ Common exam trap

Test-takers frequently confuse user context scripts (which require a signed-in user) with device context scripts (which run in the system context), leading them to choose user group assignment or configuration profiles instead of the correct device group assignment.

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

Use a device context PowerShell script in Intune and assign it to the device group.

A device context PowerShell script in Intune runs in the system context before the user signs in, making it ideal for provisioning tasks on Autopilot devices. Assigning it to a device group ensures the script executes on the target devices regardless of which user signs in, aligning with the requirement for pre-user-sign-in execution.

Answer analysis

Option-by-option breakdown

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

  • Use a device context PowerShell script in Intune and assign it to the device group.

    Why this is correct

    Device context scripts run in the system context before user sign-in.

  • Add the script as a Windows 10 platform script in Intune.

    Why it's wrong here

    Platform scripts run but are not specifically designed to run before user sign-in.

  • Assign the script to a user group containing the users.

    Why it's wrong here

    User context scripts require user sign-in.

  • Deploy the script as a device configuration profile.

    Why it's wrong here

    Configuration profiles set settings, they do not run scripts.

Go deeper

Related to this question

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.