Hello and Happy New Year!
Working with DSC/Powershell V4 I have a few questions from a colleague: You can use the File resource to copy files from one destination to another, and ensure that the directories match. DSC seems to be a very boolean tool in nature that gives a lot of True/False.
Scenario 1: With LCM set to ApplyandAutoCorrect
Q1) How is the matching done? Is it by filesize, date modified, etc?
Q2) Supposing that there is a change to the source (we add a new version of a file or more files). Is there a way to increase the logging such that DSC will list all the files that get copied?
- Currently, when I activate logging (analytic) and I test this, I only see a “config drift” False result and that DSC moves to correct it. I do not see a list of what was copied “what was wrong”.
Scenario 2: With LCM set to ApplyandMonitor
Q3) Kind of the same as Q2, only this time DSC won’t actually ‘fix’ anything. The boss is ‘hesitant’ to leave the LCM as “ApplyandAutoCorrect” during times in which we are not deploying. He wants us to reset the LCM config before and after we deploy new versions of our websites. He does however see value in having DSC monitor for config drift, but if DSC won’t list ‘what files are different in the compare source vs dest.’ in any logs then he’s said that $true and $false is insufficient, and makes us lose a business case for using DSC.
Anyone here have an idea on changing the ‘logging level’ of the File Resource in DSC? Much appreciated!