Pcornel
Automation · Windows Automation

DSC

Cheat sheet · https://pcornel.dk/topic.php?topic=5673

Back to the Topic

Answer

DSC in Windows Automation uses Desired State Configuration to declare and reconcile Windows configuration while keeping configuration source, resource/module semantics, LCM behavior, reported state and actual workload acceptance distinct.

Remember

  • Configuration compiled ≠ node applied it.
  • DSC reports desired state ≠ application behavior healthy.
  • Resource Test passes ≠ every adjacent dependency is correct.
  • Drift corrected ≠ root cause of drift understood.

First checks

  • Get-DscConfigurationStatus — last DSC run
  • Test-DscConfiguration -Detailed — drift
  • Get-DscLocalConfigurationManager — LCM settings

Verify in this order

configuration → MOF → LCM → resources

Where it usually breaks

DSC compliance proves only declared resource state and does not guarantee application health or absence of external drift sources.

Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.

DSC automation proof-boundary map

BoundaryHealthy evidenceSuspicious evidence
Scope / identityExact source revision, hosts and execution identity are explicitSelector drift, stale inventory or wrong token changes scope/authority
OperationTool/provider action and per-host result are traceablePartial failure, hidden error semantics or environment differences are lost
Platform statePersistent and effective state are read backCommand/cmdlet success is mistaken for convergence
Workload proofOriginal service/application acceptance passesAutomation summary substitutes for actual runtime behavior

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5673

Confirmation

Confirm action

Continue?