An operations team needs a nightly check that a fleet of Windows web servers still matches its desired configuration, using the PowerShell DSC engine. Which implementation should the pipeline or automation use?
Show answer and explanation
Answer: D
DSC defines the desired state of a server, and the engine enforces that state. A PowerShell step can compile and apply the configuration in push mode, while Azure Automation State Configuration pulls configurations from the cloud and reports compliance on a schedule. Both are supported ways to keep servers in their declared state. Commands that write keys directly or run installers do not describe or enforce a desired state.
Why the other options are wrong
- A. Azure CLI does not run DSC configurations. Writing registry keys directly is a one-time change that the engine would neither monitor nor correct afterwards.
- B. A Bash step cannot apply Windows DSC resources. Wrapping a Python script around the servers adds no desired-state enforcement.
- C. Running an installer and ignoring its exit code gives no desired-state model and hides failures, so drift is never detected or corrected.