← Free Scripts | Diagnostics |PowerShell

Get Platform Script Contents

Retrieve and decode the content of Intune platform scripts, which the portal will not let you view or download after upload.

Intune platform scripts cannot be viewed or copied from the portal once they are uploaded, so if the original is lost, the only supported way to get the body back is through Microsoft Graph.

This script connects to Graph, lists the platform scripts in your tenant, and decodes the one you ask for. With no parameters it lists every platform script with its Id and name; with -ScriptId or -Name it prints the decoded body; and with -Path it saves each decoded script to a .ps1 file. It is read-only.

Download Get-Platform_Script_Contents.ps1 from the PowerStacks intune-scripts repository:

GitHub
Microsoft GraphPlatform scriptsRecovery

Want simplified Intune reporting?

PowerStacks BI for Intune and App Store for Intune do the heavy lifting, all inside your own tenant, with nothing leaving it.