Building the smallest PowerShell runner

The Problem

At the day job, one of my team’s current projects is a bespoke “serverless” script execution service for internal use, not unlike AWS Lambda or similar offerings. I’m not the main guy on this, but I’ve been involved in some interesting discussions about how we should control the execution environments. Ideally, they would be sandboxed and completely disposable, possibly only alive for the lifetime of the script they are executing. The obvious solution to this is to use containers.

The dominant scripting language amongst our user base is PowerShell, so we need to try

Infrastructure as code with PowerShell DSC

Recently, I’ve been on a run of trying out different combinations of well-known automation tools to dynamically provision and tear down some dev test infrastructure that I need for a side project. The results of which I put together into a two-part tutorial called: Provisioning Windows Server 2016 with Vagrant, Hyper-V and Chef (Part 1 – Part 2).

I chose Chef to do the configuration management piece because they’re known for being quite forward in their support for Windows platforms. If you’re involved in automation I think it’s important to be comfortable with all mainstream server operating systems, so

Provisioning Windows Server 2016 with Vagrant, Hyper-V and Chef – Part 1

Introduction

I’m working on a side project at the moment that involves storage servers, specifically CIFS/SMB shares. As it’s a side project, I’m working on it at home and I don’t have access to the resources at my day job, all I have to work with is my home workstation and network. Considering those constraints, what I really need is: