Synchronising Git repositories to disk with Chef
My team has an ever-growing collection of administration scripts and tools which are organised and maintained within a number of Git repositories. In order to ensure that the copies of these scripts in production always reflect the Master branch in Source Control we set up a Chef cookbook to synchronise…
Testing Active Directory with Pester and Powershell
Irwin Strachan published a Pester script for Operational Testing of Active Directory back in April which I was keen to try out. Afterwards I extended the script to add some additional health checks of Active Directory and this post explains how the resultant combination of our work can be used…
Send notifications to Hipchat with Powershell #ChatOps
I recently implemented a Powershell module to send notifications in to our Hipchat rooms. This post explains how that script works and why this was an important shift for how we handle notifications. A number of our administrative scripts were historically configured to send emails when they performed key activities…
Handling Powershell exceptions with Try..Catch..Finally
Recently while writing a script I expected two commands I was calling to throw exceptions because I expected my script to be unable to remotely connect to some of my servers. Initially I handled the result of these exceptions with If..Else blocks, but it felt like a Try..Catch…
Automate yourself a better job with Powershell
The phrase "automate yourself out of a job" is too easily misinterpreted as a negative. Without any context it's possible to view it as to mean you shouldn't automate things. If you do you'll end up unemployed or could make others unemployed. In IT at least, this is unlikely to…