Automation · PowerShell DSC
Resources
Cheat sheet · https://pcornel.dk/topic.php?topic=5678
Answer
DSC resources are the building blocks that manage specific things, such as File, Service, WindowsFeature or community resources, each implementing Get, Test and Set.
Remember
- Resources implement Get, Test and Set.
- Built-in and community resources exist.
- Pin resource module versions.
First checks
Get-DscResource -Module <module>— resourcesFind-Module -Tag DSC— available modules- Resource version pinned — consistency
Verify in this order
resource → Test → Set if needed
Where it usually breaks
Configuration/input → graph/state refresh → plan → provider API request → provider terminal result → resource read-back → effective service state → workload.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5678