Monday, August 11, 2014

DSC Bucked Me Off and I Regrouped

PowerShell DSC Tip

At times DSC can be like trying to rein in a wild bronco, learning how to control it, without it getting skittish. 
I recently wasted a ton of man hours when I tried creating a new DSC resource.

Every time I made a change to the resource in an iterative cycle, I had some simple tests that failed over and over.

I triple checked the code, and tried everything short of reinstalling PowerShell.

TIP: Unless you tell DSC otherwise, it will cache your resource when you run it, for speed purposes. This means when you modify the resource, it does not "take" unless you get DSC to reload the cache. To do that, you turn off the caching by using DebugMode in the LocalConfigurationManager.

Debug Mode in Desired State Configuration

LocalConfigurationManager{ DebugMode = $true }

No comments:

Post a Comment