Recent Posts

Get uptime from multiple servers with Powershell

2 minute read

The following script can be used to get the current uptime from a collection of servers in Active Directory using WMI. I used it as a way to audit our estate, keen to understand how long servers have been operational for, in part to identify those which were potentially not routinely receiving Windows Updates.

Synchronising Git repositories to disk with Chef

5 minute read

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 the repositories to a network share in the environment. This post details how this functionality was developed and deployed.

Testing Active Directory with Pester and Powershell

4 minute read

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 to validate your Active Directory.

Handling Powershell exceptions with Try..Catch..Finally

5 minute read

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 might be more appropriate.

Automate yourself a better job with Powershell

4 minute read

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 be true. Powershell is 10 years old later this year and if you’re not using it, here’s why you should.

Containers in Windows Server 2016 TP5

7 minute read

I’m just starting to get my head around the concept of Containers and as such decided to take Windows Server 2016 Technical Preview 5 for a spin, which includes Docker Containers as a feature. It’s potentially worth being more explicit here (for anyone not aware) that this isn’t Microsoft’s version of Containers, this is actually Docker baked in to Server 2016. That’s a pretty cool move on Microsoft’s part.