Deploy PowerShell Script


Overview

Platform Scripts run PowerShell on devices. Use when a setting isn't available in Settings Catalog.

Key difference:


Create a Platform Script

Step 1: Navigate

Intune → Devices → Scripts and remediations → Platform scripts

Step 2: Add Script

Click + Add → Windows 10 and later

Step 3: Basics

Step 4: Script Settings

Setting System Script User Script
Script file Upload your .ps1 file Upload your .ps1 file
Run using logged on credentials No Yes
Enforce script signature check No No
Run in 64-bit PowerShell Yes Yes

Click Next

Step 5: Assignments

Step 6: Review + Create

Click Create


When to Use System vs User

Task Run As
Remove bloatware apps System
Set wallpaper via registry System
Install PWA for user User
Map network drive User
Configure AnyDesk license System

Script Runs Once

Platform scripts run once per device at next check-in. If you need it to run repeatedly (e.g., enforce a setting users can change), use Proactive Remediations instead.

Location: Devices → Scripts and remediations → Remediations


Check Script Status

  1. Go to Devices → Scripts and remediations → Platform scripts
  2. Click your script
  3. Check Device status tab
  4. Look for Success/Failed/Pending

Force Script to Run Again

Scripts only run once. To re-run:

  1. Delete the script from Intune
  2. Wait for devices to sync
  3. Re-create the script
  4. Assign again

Or modify the script slightly (add a comment) and upload as new version.


Troubleshooting

Script shows as "Failed":

Script succeeded but nothing changed:

Script not running at all:

#bcm/procedure/intune/script