View and Export your Intune Device Management Scripts Using the Microsoft Graph PowerShell SDK
Introduction
If you’re familiar with Intune, you’re likely aware of its capability to deploy platform or PowerShell scripts to your endpoint devices. Unfortunately, once you upload your script to the portal, there is (at the time of writing this) no easy way to view the script content or download it.
Resolution
To quickly and easily get Intune scripts, I created a function that allows me to export all the scripts from a tenant en masse and view them in the shell or terminal. Sometimes, I am auditing a new tenant and have no need to download the scripts to my local machine; I need to audit the code behind it to get an idea of what is being performed. Additionally, I added some other quality-of-life features that I did not find in other scripts online.
Features
Platform Agnostic
The function will work on PowerShell Core (pwsh) and Windows PowerShell. Allowing … Continue...