1

Following the examples on the web, it's not hard to set up a working example for the first DSC script.

However, I need to find a way to just list the changes that the script will make, not actually "make it so".

The challange that I have is that the script I want to test contains some Release Management specific variables that is populated during the release process. Like this:

# Copy website bits to configured deployment path
File CopyDeploymentBits
{
    Ensure = "Present"
    Type = "Directory"
    Recurse = $true
    SourcePath = $applicationPath
    DestinationPath = $($Node.DeploymentPath)
}

Is it possible to execute the script through the normal release path and just execute the "Test" part and get a log of what is OK/Not OK and not apply any changes?

Thanks!

1 Answers1

1

Unfortunately there isn't anything like that at this time.

Once the configuration is in place on a node, you could run Test-DSCConfiguration but by that point you've already applied config at least once.

briantist
  • 2,545
  • 1
  • 19
  • 34
  • Oh... Thanks for the answer. Do you know if there are any plans to implement such a feature? It would be quite useful. – Håkan Andersson Jun 12 '15 at 14:01
  • Actually, yes. In DSC v5 (which you can preview in WMF 5 right now), there is a `Compare-DSCConfiguration` cmdlet which I believe does exactly what you are asking for. I haven't used it myself though. – briantist Jun 12 '15 at 18:42