For modern management Microsoft made it available to run PowerShell scripts on Windows 10 and 11 computers from within Intune. This is an ideal way of creating a script for device configurations and push them to the groups or devices you need.
Unfortunately there is no way of retrieving the scripts once they have been uploaded through the GUI, there is however a way to do it with PowerShell.

We are going to use a PowerShell script to log into your Intune environment and export the scripts to a location of your choice.
Save the text file, read through the lines so you feel okay with it and save it as a .ps1 instead of a .txt file. You can also download the PowerShell script directly from this GitHub link.
When you run the script in an Administrator PowerShell session it will start to ask for the login credentials of your Microsoft365 tenant. Make sure they have sufficient rights to download the scripts.
If you liked this post, learned some new things or this article helped you out please think about giving a one time donation at the Donation Page to keep the site online!
Leave a comment