Recent Posts

Unit Testing with Pester : Storing complex Mock objects in a JSON file

02/14/2017  |    6 minute read

When unit testing with Pester, mocking is pretty much unavoidable, especially for code related to infrastructure, configuration, or deployment. We don’t want our unit tests to touch files, databases, the registry, and not to mention the internet, do we ?

Merging data from 2 PowerShell DSC configuration data files

01/06/2017  |    7 minute read

As you probably already know, when writing a DSC configuration, separating the environmental data from the configuration logic is a best practice. So all the environment-specific data gets stored in separate (typically .psd1) files. If you work with PowerShell DSC at medium-to-large scale, you (ho...

How to create a custom rule for PSScriptAnalyzer

06/27/2016  |    8 minute read

As you probably know, PSScriptAnalyzer is a static code analysis tool, which checks PowerShell code against rules representing best practices and style guidelines. This is a fantastic tool to set coding style and quality standards, and if we want to, we can easily enforce these standards within a ...

Adding ConfigurationData dynamically from a DSC configuration

06/06/2016  |    6 minute read

When writing a DSC configuration, separating the environmental data from the configuration logic is a best practice : it allows to reuse the same logic for different environments, for example the Dev, QA and Prod environments.