Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
To remove the active Windows PowerShell Desired State Configuration (DSC) document, open an elevated PowerShell session and run:
Remove-DscConfigurationDocument -Stage Current -Verbose
This removes DSC’s stored current.mof document and performs DSC store cleanup. It does not uninstall DSC, guarantee that resource changes are reversed, or permanently prevent a pull server or management service from applying another configuration.
What “remove DSC” means
DSC removal can refer to several different operations. Choose the one that matches your goal:
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11| Goal | Command or action |
|---|---|
| Remove the active configuration document | Remove-DscConfigurationDocument -Stage Current |
| Discard a configuration waiting to be applied | Remove-DscConfigurationDocument -Stage Pending |
| Remove the prior configuration document | Remove-DscConfigurationDocument -Stage Previous |
| Stop an operation currently running | Stop-DscConfiguration |
| Change pull or auto-correction behavior | Reconfigure the Local Configuration Manager (LCM) |
| Restore pre-DSC settings | Perform an explicit rollback or remediation plan |
Microsoft maps these stages to current.mof, pending.mof, and previous.mof in the DSC configuration store (LCM RemoveConfiguration reference).
#1 Best Overall
Inspect the node before removal
Run PowerShell with Run as administrator. Capture the current state and LCM settings before making a destructive change:
Get-DscConfiguration | Out-File .dsc-configuration-before-removal.txt
Get-DscLocalConfigurationManager | Out-File .dsc-lcm-before-removal.txt
Get-DscConfigurationStatus | Out-File .dsc-status-before-removal.txt
Use the same commands interactively when you need to inspect the output:
Get-DscConfiguration
Get-DscLocalConfigurationManager
Get-DscConfigurationStatus
Get-DscConfiguration shows the configuration currently represented on the node. Get-DscLocalConfigurationManager shows whether the LCM is using push or pull behavior and its configuration mode. Status output can reveal a running or failed job. Microsoft’s DSC getting-started documentation documents these inspection commands.
Recommended Free Tools
Remove the current document locally
-
Check for an active operation:
Get-DscConfigurationStatus -
If a job is running, stop it only after assessing the risk:
Stop-DscConfiguration -Force-Forcecan interrupt a resource operation and leave a partially completed change, so avoid using it reflexively on production servers. -
Preview the document-removal operation where supported:
Remove-DscConfigurationDocument -Stage Current -WhatIfThis confirms the selected operation; it is not a full impact analysis of every change previously made by DSC resources.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy. -
Remove the active document:
Remove-DscConfigurationDocument -Stage Current -Verbose -
Verify the result:
Get-DscConfigurationStatus Get-DscLocalConfigurationManager
The Microsoft getting-started guide uses Remove-DscConfigurationDocument -Stage Current for clearing the current configuration (Microsoft documentation).
Remove pending or previous documents
Use Pending when an unapplied configuration should be discarded:
Remove-DscConfigurationDocument -Stage Pending -Verbose
Use Previous only when you have a specific troubleshooting or housekeeping reason to remove the prior document:
Rank #3
Remove-DscConfigurationDocument -Stage Previous -Verbose
Keeping the previous document can help with troubleshooting or rollback planning. Do not delete every stage as a routine cleanup step. The cmdlet reference lists Current, Pending, and Previous as valid stages (Microsoft cmdlet reference).
Free tools Windows power users keep installed
One-click scans. No signup required.
Remove DSC from a remote machine
Use a CIM session when remoting and authentication are available:
$Session = New-CimSession -ComputerName "Server01"
Remove-DscConfigurationDocument `
-Stage Current `
-CimSession $Session `
-Verbose
$Session | Remove-CimSession
For alternate credentials:
$Credential = Get-Credential
$Session = New-CimSession -ComputerName "Server01" -Credential $Credential
Remove-DscConfigurationDocument `
-Stage Current `
-CimSession $Session `
-Verbose
$Session | Remove-CimSession
Remote removal requires working CIM/PowerShell remoting, suitable firewall rules, valid authentication, and administrator privileges. Test connectivity separately with Test-WSMan Server01. See Microsoft’s cmdlet documentation for the remote pattern.
Removing the document does not undo DSC changes
Important: Removing a DSC document is not a universal rollback.
The cmdlet removes DSC’s stored configuration document and related store state. It does not automatically reverse every action performed by resources. Depending on the resources used, the machine may still have installed features or applications, users and groups, registry values, files, services, firewall rules, scheduled tasks, IIS settings, certificates, ACLs, environment variables, or networking changes.
Rank #4
If the goal is a pre-DSC state:
- Record the current state and preserve relevant logs.
- Identify which DSC resources changed the machine.
- Create an explicit undo configuration or documented manual rollback.
- Apply and validate that remediation.
- Remove the DSC document only when the node should no longer retain that configuration.
The LCM exposes separate operations for applying, testing, stopping, rolling back, removing documents, and changing meta-configuration; document removal should therefore not be described as an inverse operation (LCM class reference).
When DSC keeps coming back
A node configured for pull mode or automatic correction can receive or reapply a configuration after its local document is removed. Inspect:
Get-DscLocalConfigurationManager
Pay attention to RefreshMode, ConfigurationMode, ConfigurationModeFrequencyMins, RefreshFrequencyMins, ConfigurationID, and any pull-server or Azure State Configuration settings.
If the node must remain enrolled, change the LCM meta-configuration through your organization’s supported procedure rather than deleting files manually. The exact steps depend on Windows PowerShell DSC versus another DSC implementation, push versus pull mode, and whether Azure Automation or another control plane manages the node. Removing current.mof alone does not guarantee that future enforcement stops.
Troubleshooting
“A configuration is running” or confirmation is requested
Inspect status first:
Get-DscConfigurationStatus
If interruption is approved, stop the operation and retry:
Best Value
Stop-DscConfiguration -Force
Remove-DscConfigurationDocument -Stage Current -Verbose
Alternatively, -Force on the removal cmdlet stops a running configuration and suppresses confirmation:
Remove-DscConfigurationDocument -Stage Current -Force -Verbose
Permission or missing-cmdlet errors
Confirm elevation and availability of the cmdlet:
Get-Command Remove-DscConfigurationDocument
The cited reference covers the Windows PowerShell PSDesiredStateConfiguration implementation (module version 1.1). Availability and behavior should be checked against the installed Windows version, PowerShell edition, and DSC implementation.
Remote failures
Test the target independently:
Test-WSMan Server01
Then verify credentials, firewall policy, CIM connectivity, and privileges. A successful local command does not prove that remote management is configured.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minuteDiagnostics
Review recent DSC operational events:
Get-WinEvent -LogName "Microsoft-Windows-Dsc/Operational" -MaxEvents 50
If the document is removed successfully but configuration returns, investigate pull-server polling, consistency checks, scheduled management agents, and organizational policy.
Should you delete the MOF file manually?
Usually no. Use Remove-DscConfigurationDocument, because Microsoft documents it as removing the selected document and performing additional cleanup. Manually deleting files, the entire DSC directory, or DSC services can leave LCM state inconsistent.
Reserve manual file recovery for a documented incident procedure after capturing diagnostics, confirming no configuration is running, taking an appropriate backup or snapshot, and understanding the LCM consequences.
The Bottom Line
Bottom line: For a local Windows PowerShell DSC node, remove the active document with Remove-DscConfigurationDocument -Stage Current -Verbose. Inspect the LCM first, stop running jobs deliberately, use CIM for remote nodes, and plan a separate rollback if you need to undo changes DSC already made.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

