DSC
Cheat sheet · https://pcornel.dk/topic.php?topic=5673
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 runTest-DscConfiguration -Detailed— driftGet-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
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Scope / identity | Exact source revision, hosts and execution identity are explicit | Selector drift, stale inventory or wrong token changes scope/authority |
| Operation | Tool/provider action and per-host result are traceable | Partial failure, hidden error semantics or environment differences are lost |
| Platform state | Persistent and effective state are read back | Command/cmdlet success is mistaken for convergence |
| Workload proof | Original service/application acceptance passes | Automation 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