View DSC Configuration Drift

Learn how to detect drift for PowerShell DSC.

John Savill

March 13, 2015

1 Min Read
View DSC Configuration Drift

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 http://blogs.msdn.com/b/powershell/archive/2014/05/29/how-to-retrieve-node-information-from-pull-server.aspx on this approach.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like