Recent Posts

Watch for changes with PowerShell

6 minute read

I recently needed to make a change to the membership of an Active Directory group which was enforced via Puppet. While waiting for the Puppet manifest to apply I used Get-ADGroupMember in PowerShell to check if the change had taken effect. Finding that it had not, I then wrote a crude loop to continually check the group membership until it changed. It occurred to me that this kind of functionality might be useful as a cmdlet and as such I have created Watch-Command. This blog post details how it works as well as some inventive but controversial design decisions I made.

Keep PowerShell Core updated on Windows with Chocolatey

2 minute read

PowerShell Core is the cross-platform version of PowerShell that runs on Windows, Mac and Linux. If you are not familar with it, check out my previous blog post on the topic. It’s likely that PowerShell Core will see more regular releases than we’ve had historically with Windows PowerShell. While you will be able to download the .msi installer for these releases to update your version, this blog post covers how can use the Windows package management tool Chocolatey to manage your upgrades instead.

Using Puppet Classes, Roles, Profiles and Templates

11 minute read

This post explores the Puppet topics of Classes, Roles and Profiles as well as how to utilise Puppet Template files. The class keyword is a key Puppet building block. There are various different ways to utilise the class keyword and these are explored below.

Using Puppet Modules, Forge and r10k on Windows

10 minute read

This blog post explores the topic of Puppet Modules for packaging and sharing code. It also looks at how you can use Puppet’s public module repository Forge to find existing modules and how you can use the r10k module management tool to update, manage and maintain them on your machines.

Puppet Variables, Expressions, Facts and Hiera on Windows

7 minute read

This post is a continuation of my earlier Getting Started with Puppet on Windows post (although most of the information in this post is OS agnostic). This post explores how you can make your Puppet manifests more dynamic via the typical programming constructs of variables, expressions, conditions and iteration. It also covers Puppet’s Facter tool (for simplifying the interrogation of system info) and Hiera mechanism (for separating configuration data from your code).

Getting started with Puppet on Windows

11 minute read

This blog post describes some initial steps you can take to learn Puppet, particularly to control Windows machines. I’m currently learning Puppet via the Puppet 5 Beginners Guide (Third Edition) book by John Arundel.

A PowerShell Tool Scorecard

11 minute read

This post contains a PowerShell tool-making scorecard: a series of short questions to assess whether your custom cmdlet/function/tool is following some (generally considered) best practice design choices.