Use this when DSC does not apply or reports errors.
DSC Troubleshooting
Troubleshoot DSC with Test-DscConfiguration -Detailed, Get-DscConfigurationStatus, the Microsoft-Windows-DSC Operational event log, resource module versions on the node and LCM settings.
1. Failures: missing modules, resource errors, credential encryption, LCM busy/pending, reboots.
2. Read DSC event log.
3. Check module versions.
4. Run with -Verbose.
5. Fix and reapply.
configuration → LCM → resource → error
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Get-DscConfigurationStatus -AllPrimary Commands
Configuration and operational commands for this Topic.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Command read-back and what it shows Verify boundary
Known-good is the latest relevant DSC status is successful, explicit desired-state testing reports compliant and the original service/workload validation passes after any required reboot; broken state is failed resource/status, pending reboot or noncompliance persists, or DSC reports success while independent read-back/workload remains wrong. Get-DscConfigurationStatus -All shows recorded DSC run outcomes only, but it does not show present compliance, application readiness or external dependency health.
Step 2 Observation-driven branch and next-check logic Narrow the fault
If latest status is failed, inspect resource/error/reboot details; if status is success but drift is suspected, run explicit Test-DscConfiguration/read-back; if configuration is compliant but workload fails, move to the target service/application boundary.
Step 3 Common mistakes Narrow the fault
- Not checking
Get-DscConfigurationStatus.
- Test-DscConfiguration -Detailed.
- DSC Operational log.
- Resource versions on nodes.
Get-WinEvent -LogName 'Microsoft-Windows-DSC/Operational' -MaxEvents 30— DSC eventsGet-DscConfigurationStatus | fl *— errorsRemove-DscConfigurationDocument -Stage Pending— clear stuck pending
ReferenceHow it works1 section · depth on demand
How it works
DSC Troubleshooting is governed by DSC Local Configuration Manager, compiled MOF/configuration state, resource execution and target resource state. LCM evaluates assigned configuration, invokes DSC resources and records consistency/run status; resources own their individual Test/Set/Get semantics while the operating system/service owns the resulting runtime behavior. Module/resource versions, pull server or configuration source, credentials, reboot requirements and target services are distinct boundaries. The important state separation is that a successful DSC run does not guarantee every application postcondition, and an old successful status does not show current drift has not occurred.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
Troubleshooting PowerShell DSC focuses on the Local Configuration Manager (LCM), resource modules and configuration errors.
| Symptom | Check |
|---|---|
| Configuration not applied | Get-DscLocalConfigurationManager (mode, refresh settings) |
| Resource not found | Module installed on the node in the required version |
| Applies but reverts/fails | Test-DscConfiguration -Detailed for non-compliant resources |
| Pull server errors | Registration key, URL, certificate, ConfigurationNames |
| Credential errors | Certificate for MOF encryption, PsDscRunAsCredential |
| Pending configuration stuck | Remove-DscConfigurationDocument -Stage Pending |
Get-DscConfigurationStatus -All | Select-Object -First 5 Status, StartDate, Error
Get-WinEvent -LogName 'Microsoft-Windows-DSC/Operational' -MaxEvents 20
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in PowerShell DSC > DSC Troubleshooting. 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%