Sometimes a DSC script doesn't wor, fails silently and stays in the system, "pending". Then, when I try to run a new DSC script I get this error:
A configuration is pending. If you are in Pull mode, please run Update-DscConfiguration to pull a new configuration and apply it. If you are in Push mode, please run Start-DscConfiguration command with -Force parameter to apply a new configuration or run Start-DscConfiguration command with -UseExisting parameter to finish the existing configuration.
Normally I don't have many deployments running at the same time, so I can afford to run this powershell command:
Remove-DscConfigurationDocument -Stage Pending
This deleted all the pending DSC configurations.