Question 966 of 991
Manage and maintain devicesmediumMultiple ChoiceObjective-mapped

Quick Answer

The best approach is to add the script to Intune as a PowerShell script and set 'Run this script using the logged on credentials' to Yes. This works because Intune’s native PowerShell script deployment feature executes the script under the security context of the currently logged-on user, allowing it to access user-specific registry keys, files, or settings that a system context script cannot. On the MD-102 exam, this question tests your understanding of Intune’s script deployment settings and the distinction between system and user contexts. A common trap is choosing a remediation script from Compliance or a Proactive Remediation package, which both run in the system context by default. Remember the key distinction: for user context, you must explicitly toggle the logged-on credentials setting to Yes; for system context, you leave it set to No. A simple memory tip: “User context = User credentials toggle on.”

MD-102 Manage and maintain devices Practice Question

This MD-102 practice question tests your understanding of manage and maintain devices. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Your organization uses Microsoft Intune for Windows device management. You need to deploy a PowerShell script to all Windows 10 devices to remediate a security issue. The script must run in the user context. What is the best approach?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "best"

    Why it matters: Signals that multiple options may be partially correct. Choose the option that most directly solves the exact problem described, not the one that sounds most complete.

Question 1mediummultiple choice
Full question →

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

Add the script to Intune as a PowerShell script and set 'Run this script using the logged on credentials' to Yes.

Option A is correct because Intune's PowerShell script deployment feature allows you to upload a script and set 'Run this script using the logged on credentials' to Yes, which executes the script in the user context on Windows 10 devices. This is the only native Intune method that directly supports running a PowerShell script in the user context without additional configuration or third-party tools.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

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

  • Add the script to Intune as a PowerShell script and set 'Run this script using the logged on credentials' to Yes.

    Why this is correct

    This runs the script in the user context.

    Clue confirmation

    The clue word "best" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Create a device configuration profile with a custom OMA-URI setting to execute the script.

    Why it's wrong here

    Configuration profiles do not execute scripts.

  • Use a device compliance policy to trigger the script when noncompliant.

    Why it's wrong here

    Compliance policies do not execute scripts.

  • Use Intune proactive remediations and configure the script to run as a detection script.

    Why it's wrong here

    Proactive remediations require both detection and remediation scripts; not suitable for a single script.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often confuse the execution context of Intune PowerShell scripts (user vs. system) and assume proactive remediations or compliance policies can run scripts in the user context, but only the PowerShell script deployment feature with the logged-on credentials option supports this.

Detailed technical explanation

How to think about this question

Intune PowerShell scripts are executed via the Intune Management Extension, which runs as a service on the device. When 'Run this script using the logged on credentials' is enabled, the script is executed under the user's token, allowing access to user-specific registry keys, files, and settings. This is critical for remediating user-context security issues like modifying HKCU registry keys or user-specific firewall rules, which cannot be accessed from the system context.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A cloud solutions architect for a retail company is evaluating services for a new workload. The correct answer here reflects best practice for the specific scenario described — not a general cloud recommendation. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Cloud exam questions reward reading the constraint carefully: the same technology can be right or wrong depending on the use case.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related MD-102 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free MD-102 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this MD-102 question test?

Manage and maintain devices — This question tests Manage and maintain devices — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Add the script to Intune as a PowerShell script and set 'Run this script using the logged on credentials' to Yes. — Option A is correct because Intune's PowerShell script deployment feature allows you to upload a script and set 'Run this script using the logged on credentials' to Yes, which executes the script in the user context on Windows 10 devices. This is the only native Intune method that directly supports running a PowerShell script in the user context without additional configuration or third-party tools.

What should I do if I get this MD-102 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Are there clue words in this question I should notice?

Yes — watch for: "best". Signals that multiple options may be partially correct. Choose the option that most directly solves the exact problem described, not the one that sounds most complete.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 24, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.