Configuring Remediations
While Platform scripts are excellent for run-once scenarios such as when you are provisioning a device, PowerShell is incredibly powerful and there may be situations where you want something to run more than once, or you want to view the output in the console itself.
This is where Remediations (formerly Proactive Remediations) come into play. They can be set to run on a schedule, but as they work with a detection and remediation configuration, the script itself will only run if required.
A Remediation is split into two scripts: a Detection script and a Remediation script.
The detection script is arguably the most important of the two as this decides whether the Remediation script needs to run. The key output here is the exit code. An exit code of 0
means the device is compliant with the check and no further action is needed. If the exit code is 1
, it causes the remediation to run.
There are no restrictions on the content of the scripts, so long...