Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

Resources · PowerShell DSC

Direct 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.

When to use this

Use this when choosing and pinning DSC resources that implement Get, Test and Set.

First 30 seconds

1. Resources implement Get/Test/Set for a setting.

2. Use community resources (ComputerManagementDsc, NetworkingDsc).

3. Pin module versions.

4. Write custom class-based resources if needed.

5. Test resources.

Operational verification

resource → Test → Set if needed

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
PowerShell Desired State Configuration
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformPowerShell Desired State Configuration · Automation implementations are tool and platform specific. Use the adjacent Domain for the technology being automated and this Domain for automation behavior.
Scope / prerequisiteUse this when choosing and pinning DSC resources that implement Get, Test and Set.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification path Verify boundary

The negative fixture should deliberately exercise risks such as resource module drift, duplicate/ambiguous keys, credentials in artifacts, reboot/pending-state handling, push/pull source drift and resource reporting success without actual convergence, choosing the cases most relevant to resource schema/key properties, Get/Test/Set behavior, module/version identity and confirming the underlying managed resource converges.

Step 2 Common mistakes Narrow the fault
  • Resource modules missing on nodes.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Resources implement Get, Test and Set.
  • Built-in and community resources exist.
  • Pin resource module versions.
Key checks
  • Get-DscResource -Module <module> — resources
  • Find-Module -Tag DSC — available modules
  • Resource version pinned — consistency
ReferenceWhy it matters1 section · depth on demand

In depth

DSC resources are the building blocks of a PowerShell DSC configuration: each resource knows how to check and set one kind of thing — a Windows feature, a file, a registry value, a service, a firewall rule. Every resource implements Get, Test and Set, which is what makes DSC idempotent.

Configuration WebBaseline {
  Import-DscResource -ModuleName PSDesiredStateConfiguration
  Node 'web01' {
    WindowsFeature IIS { Name = 'Web-Server'; Ensure = 'Present' }
    Service W3SVC { Name = 'W3SVC'; State = 'Running'; DependsOn = '[WindowsFeature]IIS' }
  }
}
Find-DscResource -Name *Firewall*
Get-DscResource -Module NetworkingDsc

Community resources (e.g. ComputerManagementDsc, NetworkingDsc) cover most needs; DSC v3 is a newer cross-platform engine, so check which version your resources target.

ReferenceImportant terms & boundaries1 section · depth on demand
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docPowerShell Desired State Configuration current

Authoritative/upstream documentation reviewed for bounded claims in PowerShell DSC > Resources. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://learn.microsoft.com/en-us/powershell/dsc/overview?view=dsc-3.0 · confidence 94%
Depth when you need it

Deep reference

Healthy vs suspicious evidence

Output interpretation

For resource schema/key properties, Get/Test/Set behavior, module/version identity and confirming the underlying managed resource converges, prefer typed fields and stable IDs over human presentation text.

Confirmation

Confirm action

Continue?