PowerShell Scripting across Intune
An important and often overlooked part of Intune is its ability to run scripts on devices, whether as one-off deployments (Platform scripts) or more regularly via Remediations (previously called Proactive Remediations). With Windows 10 and Windows 11, PowerShell has become increasingly more powerful to the point where almost anything can be done on devices with a script.
In Intune, we can use PowerShell scripts to configure properties not yet available in the settings catalog, copy files, add registry keys, or even run a script to remove unwanted Windows bloatware for a cleaner build.
Platform scripts are run as configurations for simple configuration settings or anything required during device setup. Remediations, on the other hand, are repeatable scripts with logic that only runs when required.
Throughout this chapter, we will learn how to deploy PowerShell scripts and Remediations, but also how to write the scripts themselves and provide...