Run Frequency: Once Daily at 12pm
Remediation Script Summary
Starts Logging
The script begins by starting a log file in the CProgramDataMicrosoftIntuneManagementExtensionLogs directory, timestamped for tracking.
Identifies Failed Win32 App Installations
It retrieves the list of failed Win32 app states from the registry under HKLMSOFTWAREMicrosoftIntuneManagementExtensionWin32Apps. Each failure is identified based on specific error codes.
Maps User and App Information
For each failure, the script parses registry paths to extract user and app IDs. It then retrieves the associated username and an error description for clarity.
Cleans Up Registry Keys
The script removes relevant registry entries for each failed app installation, including general and GRS-specific keys, to trigger reinstallation attempts by Intune.
Restarts Intune Management Extension
If any failures were detected, the script restarts the Intune Management Extension service to apply changes and retry installations.
Stops Logging
After processing, the script stops the logging session to complete the remediation.