An organization manages Windows 10 devices with Microsoft Intune. They need to deploy a PowerShell script that runs once on each device to remediate a security issue. The script should not run again after successful execution. Which configuration should be used?
Trap 1: Assign the script to all devices and set 'Run this script using the…
This would run the script repeatedly, not just once.
Trap 2: Use a proactive remediation with a detection script and set 'Run…
This runs on every logon, not once.
Trap 3: Use a custom compliance policy with a script that runs daily
Custom compliance policies are for compliance checks, not one-time remediation.
- A
Assign the script to all devices and set 'Run this script using the logged on credentials' to Yes
Why wrong: This would run the script repeatedly, not just once.
- B
Use a proactive remediation with a detection script and set 'Run script on every logon' to No, and configure the remediation script to exit with code 0 on success
The detection script checks if remediation is needed; if not, the remediation script doesn't run. Setting 'Run script on every logon' to No ensures it runs only once.
- C
Use a proactive remediation with a detection script and set 'Run script on every logon' to Yes
Why wrong: This runs on every logon, not once.
- D
Use a custom compliance policy with a script that runs daily
Why wrong: Custom compliance policies are for compliance checks, not one-time remediation.