View DSC Configuration Drift

View DSC Configuration Drift

Learn how to detect drift for PowerShell DSC.

Q. How can I detect drift between an applied PowerShell DSC and the current state of a machine?

A. The simplest way to check for drift of configuration between the applied configuration and the current state is to run Test-DscConfiguration, which will return true if the configuration is correct or false if there is configuration drift. In WMF 5.0 a new cmdlet, Compare-DSCConfiguration, can show the actual drift items. Also in WMF 5.0 is the ability to add -Detailed switch to the Test-DscConfiguration cmdlet. If using a Pull server you can use this to retrieve status; more detail can be found at on this approach.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.