It looks like getting back all the script content in Intune is of high interest 😉, soon after I published how to get back your Proactive Remediation Scripts, I got another request for the Intune Win32 Application scripts (Detection and Requirement scripts).
So here we go, another small script to get back all the Win32 application scripts. To be precise, there can be several Requirements scripts attached to a Win32 application:
But only one Detection script can be there:
As explained already, I decided to code it in a similar way like the other scripts I already published:
The function uses the Intune PowerShell SDK like the other scripts:
The script is super easy to use, just call it with the FolderPath parameter to download all Win32 App Scripts:
Get-Win32AppScripts -FolderPath C:\Temp\Win32AppScripts
Or you specify in addition the AppId parameter to download the individual scripts for a single Win32 application:
Get-Win32AppScripts -FolderPath C:\Temp\Win32AppScripts -AppId 2cd64b95-dda3-4333-bcf1-6d9f3237ce73
Your specified folder will give you access to all your Win32 application scripts or just the individual one you specified. Organized by folders and the folder names are constructed from AppId_DisplayName:
The folders containing the scripts which were found:
The complete script can be found here:
I guess we are now complete and have access to all the script content in Intune again. Again, I hope 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.