My Profile Photo

Matthew Hodgkins Blog


System Engineer, PowerShell, Chef and Automation lover and Aussie. Living and working in the Netherlands.


  1. Testing Ansible Roles Against Windows with Test-Kitchen

    During the development of automation for your infrastructure, you will find yourself doing the same types of processes over and over: Creating virtual machines to run your code against Copy the automation code to the instance Running the automation code against your instance Performing tests against your instance These “overhead” process can take a considerable amount of time that you could be spending writing code. How do we fix this? Improving our automation development workflow...…


  2. Best Practices with Packer and Windows

    Why you should be using Packer Getting Started with Packer Best Practices Step by Step Generic Templates Use guest additions mode of attach Use environment variables to change the action of a provisioning script Keep the OS information in your build script Disable WinRM on build completion and only enable it on first boot Use headless mode Set a high shutdown and WinRM timeouts Conclusion Why you should be using Packer Already know why Packer...…


  3. Ultimate PowerShell Prompt Customization and Git Setup Guide

    Source control and Git keeps getting more and more important for both Developers and Operations guys. Getting up and running with Git on MacOS or Linux is very easy as most things are built in. There are also cool tools like oh-my-zsh to customize your prompt. On Windows, it’s a bit of a different story. Let’s spend a little time installing ConEmu and Git, then customizing it to take our prompt from something that looks...…


  4. 5 Tips for Writing DSC Resources in PowerShell 5

    I have recently been writing some class based DSC resources and have been enjoying the experience much more than (trying to) write DSC resources in PowerShell v4. Using classes really simplifies the development process of the DSC resources, and I believe class based resources will be the norm going forward. As PowerShell v5 RTM has only been recently released back in February 2016, the large majority of DSC resources available on GitHub still use the...…


  5. Windows Metric Dashboards with InfluxDB and Grafana

    Understanding performance of your infrastructure is extremely important, especially when running production systems. There is nothing worse than a customer calling and saying they are experiencing slowness with one of their applications and you having no idea where to start looking. In the 2014 State of DevOps survey survey, one of the questions asked was how is your organization notified of failure?. Here was the multiple choice question asked: Through the survey, one of the...…


  6. ChatOps on Windows with Hubot and PowerShell

    UPDATED 8th July, 2016: Created a installation video for Hubot using PowerShell DSC here. UPDATED 1st July, 2016: Created a PowerShell DSC Resource to install Hubot which makes the process much easier. Can be found on GitHub here or found in the PowerShell Gallery here. ChatOps is a term used to describe bringing development or operations work that is already happening in the background into a common chat room. It involves having everyone in the...…


  7. Setup Windows 10 For Chef and PowerShell DSC Development

    I am in the process of writing up some blog posts about working with PowerShell Desired State Configuration (DSC) and OpsCode Chef from a Windows Workstation / Windows Server perspective. This first article will cover the steps required to setup a development environment for someone that is doing work with PowerShell Desired State Configuration (DSC) or OpsCode Chef. We will be covering the following: Installing git and poshgit - source control for your code and PowerShell integration for git Installing VirtualBox...…


  8. The Ultimate Guide to PowerShell String Formatting

    When scripting with PowerShell, you will come to a point where you need to work with strings that contain variables. Depending on your situation, there are several methods you can use when formatting strings in PowerShell. This blog will walk through these options. We will start simple and ramp up the complexity. We run into our first problem here. We are using a dollar sign in our string, so PowerShell thinks it is a variable...…


  9. Automating with Jenkins and PowerShell on Windows - Part 2

    After reading Automating with Jenkins and PowerShell on Windows Part – 1, you should have a grasp on the basics of Jenkins and be excited to start doing more automation! Let’s start reaching out into our network with Jenkins and take actions on remote machines. Jenkins provides a means to do this, which is to install a Jenkins agent onto each machine you want to reach out to. This is a decent option, but instead...…


  10. Automating with Jenkins and PowerShell on Windows - Part 1

    Take a minute think about how many PowerShell scripts you have written for yourself or your team. Countless functions and modules, helping to automate this or fix that or make your teams lives easier. You spend hours coding, writing in-line help, testing, packaging your script, distributing it to your team. All that effort, and then a lot of the time the script is forgotten about! People just go back to doing things the manual way....…