Simple definition
An Intune remediation script applies corrective actions to devices after a paired detection script identifies an issue.
Purpose and use
A remediation script is the part of an Intune package that corrects the detected issue.
How does it work?
In the intended Remediations workflow, detection exit code 1 triggers correction; execution context and output must follow service conventions.
Example and verification
Validate final state and test correction on compliant, partially corrected and failing devices.
Points to watch
A script completing without error does not always prove that the issue disappeared. Logs should not expose secrets or unnecessary data.
In short
The script should correct a specific condition and make the result verifiable using only the required privileges.