Enrolled Windows 11 devices in a tenant hold a registry value that a line of business application reads at startup, and support calls show the value drifting on a handful of devices every week. The value has to be inspected and put back to the agreed setting on any device where it has drifted, repeatedly and with nobody visiting a machine. A colleague proposes a Microsoft Graph PowerShell script scheduled on a management server. Which approach meets the requirement, and why?
- ASchedule the proposed Microsoft Graph PowerShell script on the management server, because Microsoft Graph exposes the registry of each enrolled device to an administrator holding the right scopes.
- BAssign an Endpoint Analytics remediation holding a detection script and a remediation script, because those scripts run on the device itself and can read and rewrite the registry value. Correct
- CCreate a custom compliance policy carrying a discovery script, because a compliance policy corrects any setting it finds outside the expected value and reports the device afterwards.
- DDeploy a device configuration profile from the settings catalog, because a profile writes whatever registry value an administrator names in it and rewrites that value whenever it drifts.
Why A is wrong: Tempting because Microsoft Graph is the correct tool for automating Intune at scale and does drive many device actions. It is wrong because Graph works on the service objects Intune holds, and it offers no read or write access to arbitrary registry values inside a device.
Why B is correct: Correct. A remediation runs the pair of scripts inside the operating system of each device it is assigned to, on a recurring schedule, which is what allows a value held in Windows to be read and corrected with nobody attending the machine.
Why C is wrong: Tempting because a custom compliance policy does run a PowerShell discovery script on the device and does read the value in question. It is wrong because a compliance policy reports a state and can show the user a message, and it changes nothing on the device.
Why D is wrong: Tempting because configuration profiles do reapply their settings and do result in registry writes on Windows. It is wrong because the settings catalog exposes a defined set of settings rather than an arbitrary registry path chosen by the administrator.