Question 138 of 975
Deploy and manage a Microsoft 365 tenantmediumMultiple ChoiceObjective-mapped

Quick Answer

The correct choice is Microsoft Intune PowerShell scripts (Devices > Scripts) because this policy type is specifically designed to deploy custom PowerShell scripts that can run in the user context on Windows 10 devices, and it supports execution after every device restart by enabling the “Run this script using the logged on credentials” option and setting the schedule to “Run on every device restart.” This works because the script runs under the logged-on user’s security context, allowing access to user-profile resources and registry settings that a system-context script cannot reach. On the MS-102 exam, this question tests your understanding of Intune’s script deployment capabilities versus other policy types like configuration profiles or compliance policies, which lack user-context restart triggers. A common trap is confusing this with proactive remediations, which run in system context, or with scheduled tasks, which require additional configuration. Memory tip: think “User + Restart = Scripts node” — the Devices > Scripts blade is your only built-in path for user-context, restart-triggered PowerShell execution.

MS-102 Deploy and manage a Microsoft 365 tenant Practice Question

This MS-102 practice question tests your understanding of deploy and manage a microsoft 365 tenant. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. 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 to manage Windows 10 devices. You need to deploy a custom PowerShell script that runs in the user context after every device restart. Which Intune policy type should you use?

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

Microsoft Intune PowerShell scripts (Devices > Scripts)

Option C is correct because Microsoft Intune PowerShell scripts (Devices > Scripts) allow you to deploy custom PowerShell scripts that run in the user context on Windows 10 devices. By configuring the script with 'Run this script using the logged on credentials' and setting the schedule to 'Run once per device' or 'Run on every device restart', you can ensure the script executes after every restart. This is the only Intune policy type designed specifically for deploying and managing custom PowerShell scripts with user context and restart-triggered execution.

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.

  • Compliance policy

    Why it's wrong here

    Compliance policies evaluate settings, not run scripts.

  • PowerShell script as a 'Run this script using the logged on credentials' assignment.

    Why it's wrong here

    This is a valid method, but the question asks for policy type, not assignment.

  • Microsoft Intune PowerShell scripts (Devices > Scripts)

    Why this is correct

    Intune PowerShell scripts can run in user context and on restart.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Device configuration profile

    Why it's wrong here

    Configuration profiles do not run scripts.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates confuse the 'Run this script using the logged on credentials' setting (a configuration option within the PowerShell scripts feature) with a separate policy type, leading them to select Option B instead of recognizing that the correct policy type is 'Microsoft Intune PowerShell scripts (Devices > Scripts)'.

Detailed technical explanation

How to think about this question

Intune PowerShell scripts (Devices > Scripts) use the Intune Management Extension (IME) to download and execute scripts on Windows 10/11 devices. The 'Run this script using the logged on credentials' option leverages the user's security context, which is critical for scripts that need to access user-specific resources like registry keys under HKCU or user profile paths. The script runs after every restart when the 'Run on every device restart' schedule is selected, and the IME checks for new or updated scripts during its periodic sync (typically every 1 hour) or at device boot.

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 MS-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 MS-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 MS-102 question test?

Deploy and manage a Microsoft 365 tenant — This question tests Deploy and manage a Microsoft 365 tenant — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Microsoft Intune PowerShell scripts (Devices > Scripts) — Option C is correct because Microsoft Intune PowerShell scripts (Devices > Scripts) allow you to deploy custom PowerShell scripts that run in the user context on Windows 10 devices. By configuring the script with 'Run this script using the logged on credentials' and setting the schedule to 'Run once per device' or 'Run on every device restart', you can ensure the script executes after every restart. This is the only Intune policy type designed specifically for deploying and managing custom PowerShell scripts with user context and restart-triggered execution.

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

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

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 MS-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 MS-102 exam.