Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

Configuration

Direct answer

A DSC configuration is a PowerShell block that declares resources and their desired properties for nodes, compiled into one MOF file per node.

When to use this

Use this when writing a DSC configuration block.

First 30 seconds

1. A configuration is a PowerShell block declaring resources per node.

2. Separate configuration data.

3. Use composite resources for reuse.

4. Credentials need encryption (certificates).

5. Version control.

Operational verification

configuration + data → compile → MOF per node

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. · Windows PowerShell DSC
Key commandGet-DscConfiguration
Scope / prerequisiteUse this when writing a DSC configuration block.
Verify · 1
What next?3 suggested next steps
Catalog command links1
Evidence0
On this pageJump to a specific section
Automation command reference

Primary Commands

Configuration and operational commands for this Topic.

Operational workflow

Verification & Troubleshooting

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

3 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 Command read-back and what it shows Verify boundary

Verification for PowerShell DSC → Configuration must distinguish state, not merely report that a command ran. With Get-DscConfiguration, known-good means the intended node receives a compiled configuration containing the expected resource instances/properties and a subsequent DSC consistency check evaluates that same configuration without schema or targeting mismatch; known-broken/suspicious means compile/schema errors, wrong node identity, missing/old MOF, unexpected resource properties or a correct document that the node cannot evaluate. Get-DscConfiguration shows the configuration/resources currently reported by DSC on the queried node, but it does not show source configuration correctness, future convergence or application health.

Step 2 Observation-driven branch and next-check logic Narrow the fault

When PowerShell DSC → Configuration fails, reproduce the smallest original case and capture Get-DscConfiguration before mutation. Use the observation to choose the next check: if compilation fails, inspect resource schema/module/version and configuration data; if compilation succeeds but node document is missing/wrong, inspect node naming/output path; if correct MOF exists but convergence fails, move to LCM/resource execution and node-side state.

Step 3 Common mistakes Narrow the fault
  • Configurations with credentials in plain text.
Key points
  • A configuration declares resources per node.
  • It compiles to one MOF per node.
  • Configuration data separates values from structure.
Key checks
  • Configuration WebServer { … }; WebServer -OutputPath .\mof — compile
  • Configuration data (.psd1) separate from logic — parameters
  • Configurations in git — versioning
ReferenceWhy it matters1 section · depth on demand

In depth

A DSC configuration is a PowerShell block (Configuration keyword) that, when run, compiles into a MOF document per node. The MOF is what the Local Configuration Manager actually applies.

PartPurpose
Configuration Name { }Defines the configuration
Import-DscResourceBrings in resource modules
Node blockTarget machine(s)
Resource blocksDesired settings
Configuration data (-ConfigurationData)Separates per-node data from structure
$data = @{ AllNodes = @( @{ NodeName = 'web01'; Role = 'Web' }, @{ NodeName = 'web02'; Role = 'Web' } ) }
WebServer -ConfigurationData $data -OutputPath C:\DSC\Web

Never put plain-text credentials in configuration data; use certificates to encrypt them in the MOF.

ReferenceHow it works1 section · depth on demand

How it works

PowerShell DSC → Configuration should be reasoned about as a state pipeline, not as one command outcome. The responsible state is the DSC configuration document, compiled MOF identity, node targeting and resources/properties that define desired state for one managed node. A DSC configuration is authored as PowerShell and compiled into node-specific MOF documents; resource schema and configuration data determine the properties the Local Configuration Manager will later evaluate; meanwhile module/resource versions, certificates for protected credentials, configuration data, pull-server availability and node registration are separate things to check. This distinction is especially important because successful compilation shows document/schema consistency only, not that the intended node received the correct MOF or can converge it.

ReferenceImportant terms & boundaries2 sections · depth on demand

Known-good, transitional and broken reference

Configuration — comparative operational reference for PowerShell DSC → Configuration. What it does not show: request acceptance or job success does not show target change, effective state or workload recovery Next check: move one step toward the original workload using Inspect $Error/exception/exit semantics and the returned object, then query the target independently and verify the service/application outcome rather than treating command completion as evidence. Platform/scope: PowerShell 5.1/7+, module versions and remoting endpoint behavior vary by host/platform.

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 > Configuration. 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%
Confirmation

Confirm action

Continue?