Blog Index

All blog articles. Yup, every single last one of them. Bedtime reading for the masochistic.


PostgreSQL Replication: Failover

2016-03-14T20:30:00Z

I've spent the last few days equipping myself with the knowledge I need to support failover of our data tier from production to disaster recovery and vice-versa. In the lab I built a series of PostgreSQL Servers and set up replication between them. In this article I explore failover. Failover Scenario I'm…

PostgreSQL: Basic Replication with Synchronous and Asynchronous Hot Stand-by

2016-02-11T20:30:00Z

I've spent the last few days equipping myself with the knowledge I need to support failover of our data tier from production to disaster recovery and vice-versa. In the lab I built a a series of PostgreSQL Servers and set them up replication between them. This article describes how. The Desired…

Using the PowerShell Get-DhcpServ4Lease Cmdlet

2016-01-31T12:00:00Z

During the course of normal day-to-day system administration I found on a number of occasions that I had PTR records that would not resolve. I suspected there was an issue with the configuration of the DHCP Server running on our Microsoft AD Domain. My first step was confirming the problem.…

Windows Deployment Services and the Get-WdsDriverPackage Cmdlet

2016-01-27T19:30:00Z

I made the fatal mistake of importing 133 driver packages into a Windows Server 2012 Instance of Windows Deployment Services without adding them to a driver group. Needless to say, when I imaged a machine using WDS dependent on some of those drivers, they were not automatically installed. I wanted to…

Windows Remote Backup using OpenVPN and Robocopy

2016-01-04T20:30:00Z

It's not unusual for friends and relatives to ask for my help and/or advice when it comes to their own laptops, computers and Internet connections. This festive/new year period has been no exception. I took on the responsibility of setting up a laptop for a relative to use in their…

Migrating WSUS from 3.0 SP2 to Server 2012 r2

2015-12-30T20:30:00Z

Migrating Windows Server Update Services from Windows Server 2008 R2 (WSUS 3.0 SP2) to Windows Server 2012 R2. This guide is applicable to WSUS installations using the Windows Internal Database. Pre-requisite Steps Install the WSUS role on the destination server and run through the Windows Server Update Services Configuration Wizard. Backup Binaries and…

Creating an LXC Containerized Selenium Grid

2015-12-08T20:30:00Z

This guide shows you how to build one or more self-contained Selenium grids using: Ubuntu Server 14.04.3 LTS Selenium Server 2.48.2 LXC containers for each grid node - this means we can run more tests in parallel without running into Selenium/Firefox mutex problems vnc4server and Openbox to provide a desktop - sometimes developers like…

Using PowerShell to List Domain Computers by Uptime

2015-11-18T20:30:00Z

This article introduces a short but powerful PowerShell snippet, the basis of which I find useful for performing a variety of ad-hoc tasks in my day-to-day work as a sysadmin. I had recently applied a change to a series of workstations via Group Policy. It was a slightly tricky software upgrade.…

Building a ZFS Backup Server

2015-11-16T20:30:00Z

I've been running an Ubuntu home server with ZFS based storage for sometime. What follows is a rather detailed walk through my implementation of a ZFS backup server. I have been meaning to implement ZFS snapshot based backups for quite some time and I figured I may as well document…

Invoke-CimMethod : Unable to load PS module for validation - How to Resolve this DSC Problem

2015-11-03T10:30:00Z

After updating one of the DSC modules available on a Desired State Configuration Pull Server I found that, when forcing a DSC client to update it's configuration, I was presented with the error "Invoke-CimMethod : Unable to load PS module C:\Program Files\WindowsPowerShell\Modules\myDSCResources\DscResources\myDSCModule for validation.". PS E:\> Invoke-CimMethod -ComputerName somecomputer -Namespace…

Make an Oracle VM Virtual Box Ubuntu Server Network Accessible

2015-10-17T20:30:00Z

If you've followed the previous article in this "from scratch" series, you will have installed Ubuntu server. If you've installed it into an Oracle VM Virtual Box virtual machine, then the next step is making it accessible to the rest of your network. If you installed Ubuntu Server onto physical…

Force a DSC Client to Refresh it's Configuration from the Pull Server

2015-10-13T17:00:00Z

Whilst testing Desired State Configuration settings and scripts, it can be quite useful to force a DSC client note to refresh it's configuration from the pull server. It's worth noting that each client node has a scheduled task called "Consistency". Opening Task Scheduler and manually triggering the scheduled task is…

How do I publish modules from the DSC Pull Server

2015-10-12T20:00:00Z

One of the huge advantages of using a Desired State Configuration Pull Server is the ability to easily distribute resources to subscribed client nodes. For this example, I've installed the xSmbShare module locally. The first step is then creating an archive for our module: PS \> Add-Type -A System.IO.Compression.FileSystem PS \> [IO.Compression.ZipFile]::CreateFromDirectory('C:\Windows\System32\WindowsPowerShell\v1.0\Modules\DSCResources\xSmbShare', "$env:TEMP\xSmbShare_1.0.zip") Move…

How do I query the DSC Compliance Server?

2015-10-12T19:00:00Z

Having previously installed the Windows Desired State Configuration service, configuring both pull and compliance servers, I was left wondering how to query the compliance server. I found that before I could query the the compliance server, I had to tweak a configuration file to allow Windows Authentication. Edit "C:\Windows\System32\inetsrv\config\applicationHost.config" directly,…

Creating a Desired State Configuration Pull Server

2015-10-07T17:30:00Z

Previously I've discussed using DSC in a push configuration where by an administrator applies configuration changes to a node by compiling a DSC script into a MOF (Managed Object File) and running Start-DSCConfiguration against a target node from their workstation. Pushing DSC configuration is hardly zero-touch as it relies on someone…

How does NAT Work?

2015-10-06T17:30:00Z

NAT means Network Address Translation. If you've never been aware of NAT, you've probably been used it extensively without realising it. Most home broadband routers use Network Address Translation. Your router, or gateway, essentially provides a mechanism for one single public IP address provided by your internet service provider to…

Migrating a Windows DHCP Server

2015-10-01T19:00:00Z

Today's main task was a Domain Controller migration as part of a continued Windows Server 2012 r2 Upgrade. The most enjoyable part of this task was the shortest - migrating the Windows DHCP Service from the old 2008 r2 Server to it's temporary new home on a virtualised 2012 r2…

Resolving a GlusterFS Server Failure

2015-09-30T19:30:00Z

I'm responsible for maintaining four servers that have been built for running automated browser tests using Selenium. Each server runs a selenium hub and multiple XVNC desktops / selenium nodes. The tests are run in Firefox and the Firefox profile utilised by Selenium imports the Firebug Firefox extension. The profile…

Installing Ubuntu Server From Scratch

2015-09-30T19:00:00Z

This is the first in the "From Scratch" series of articles. Unlike the remainder of the Biscuit.Ninja articles I write which are very niche, this series assumes no prior knowledge. There's a number of reasons for wanting to install and configure your own server. You may for instance want to host…

Windows Desired State Configuration - A Primer

2015-09-27T17:30:00Z

I've recently completed my first DSC deployment, as part of an upgrade to 12 IIS Servers across two data centres. Whilst I was testing DSC in my lab, I wrote a primer for my colleages. Here is that primer, with some edits. It's a rough guide but it features links…

Resolving DNS Resolution Issues in Ubuntu and Ubuntu Derived Distros

2015-09-24T20:00:00Z

Using Ubuntu 12.04/12.10 and later versions/derivatives (including my current desktop distro of choice, Linux Mint), I have had periodic issues with programs resolving the IP addresses of hosts on the local network. These are easily resolved with just a handful of configuration tweaks. dnsmasq The first problem I noticed, was an occasional…

What's eating all my disk? Using 'du' in Linux

2015-09-23T17:30:00Z

I've just been awakened courtesy of an alert from Nagios kindly advising that a host is down. That was very quickly resolved, but whilst I was awake I noticed a warning for disk space utilisation on one of the Selenium test runners used in our development environment, so I decided…

Stop Visual Studio 2013 from loading a Plug-in with a PowerShell Start-up script

2015-09-21T18:00:00Z

I was recently tasked with preventing Redgate's SQL Complete plug-in from starting with the Visual Studio 2013 IDE. Initially I created a GPO that removed the "C:\Program Files(x86)\Devart\dbForge SQL Complete" registry value from HKLM\Software\Microsoft\VisualStudio\12.0_Config\AutomationOptions\LookinFolders. This solution proved to be inadequate because although it ran when the user logged in, if…

Get Windows Event Log Entries using Powershell

2015-09-19T18:00:00Z

Whilst rolling an upgrade to Microsoft Server 2012 r2 in a VMWare VSphere virtualized cluster, we encountered a problem where-by individual servers would periodically lose network connectivity over one or both of their network adapters. Whilst the actual problem remains under investigation, I felt it might be useful to write…

Deleting a User's Local Profile with PowerShell

2015-09-19T17:00:00Z

In some situations it can be useful to remove a users local profile from a PC, for example, when testing installation of software into the users profile or even when testing the application of a Group Policy. This PowerShell one liner can accomplish just that: (Get-WmiObject -Class win32_userprofile -ComputerName <RemoteComputerName> |…

Blocking an IP Address with iptables

2015-09-16T09:00:00Z

I have this blog hosted on a VPS which is protected by Fail2Ban. Thus far I've found most would-be attackers quickly move on when their IP addresses have been blocked a few times. Occasionally one of the blighters will persist, hence I use iptables to permanently drop all of the…