One of my blog readers kindly asked if I can provide a similar script like the one downloading all Intune PowerShell scripts for the Proactive Remediation Scripts. I’m happy to provide a modified version of my script to do exactly this. It uses the same technique as I used in my old script. There are always a lot of ways to accomplish your goals, for example using the Microsoft.Graph.DeviceManagement Module. But anyway, I decided to recycle my old script to download the HealthScripts wich are the Proactive Remediation scripts.
The function uses the Intune PowerShell SDK like the “PowerShell Script Download” script:
It is super easy to use, just call it with the FolderPath parameter to download all Proactive Remediation Scripts:
Get-DeviceHealthScripts -FolderPath C:\temp\HealthScripts
Your specified folder will give you access to all your scripts organized by folders (folder names derived from Proactive Remediation display name):
The folders contain the Detection script and if available also the Remediation script.
The complete script can be found here:
I hope again it helps some people with lost original scripts or consultants without access to the original files. It can also be handy during tenant-to-tenant migrations.