Rugged Tooling: Forget AI - Integrate Human Intelligence

I lead a team that builds highly shared, deep-in-the-stack automation at a large SaaS company that has many software stacks in AWS. This automation includes things like installing security scanners, log collection agents and monitoring agents - all for both Windows and Linux.

I inherited a lot of this code and was working together with a team member and a technician from the software company for one of these agents that was giving us trouble when I realized we could improve the ruggedness of our code significantly.


Read more

Share Comments

Culling Dead Computer Records From AD with a Scheduled PowerShell Oneliner

In one of the DevOps automation testing environments I work with I recently came across an AD OU that had over 75,000 unused computer records. This environment is used for repeated testing of entire automation stacks with unique computer names, so it is normal that these records would pile up. While this particular OU was for Linux machines - the problem obviously affected both Windows and Linux across all OUs.

Being that it is the year 2018 I thought finding a ready-made solution on the web would be child’s play (oh Murphy - why do you plant those thoughts in my head!).

As it is with the Toolsmithing nature, when I could not find a simple solution, I had a strong desire to conjure a tool for everyone.


Read more

Share Comments

Fully Automated, On Demand EBS Initialization in both Bash (for Linux) and PowerShell (for Windows)

There has been a nasty rumor going around that EBS volumes no longer need initialization (formerly pre-warming). The Amazon page that talks about this mentions that it is no longer needed, but that it IS needed for EBS volumes created from snapshots.

Although custom and Amazon AMIs are stored as snapshots, many people I talk to have come to believe that EBS volumes simply don’t need initialization, no matter what. I sought clarification from AWS support and learned that the boot volumes of our custom AMIs definitely need initialization as do AWS AMIs. Basically initialization is not needed if you just created a fresh EBS volume (console or Cloud Formation) that has never been snapshotted as part of an AMI.

The newest utility advised by Amazon is the File IO testing utility known as FIO. I decided to write a provisioning automation utility script that would automatically download this and run it or schedule it. Since I have been looking for excuses to improve my Bash coding skills - I decided to write the provisioning automation in both Bash and PowerShell.


Read more

Share Comments

Setting Up Your Own Private, Secured Package Repository at PowerShell and DevOps Summit 2018

I will be speaking at the PowerShell and DevOps Summit 2018 on the topic of Setting Up Your Own Private, Secured Package Repository Abstract: Security and availability are good defensive reasons to curate public packages into a private repository, but there are many positive reasons as well! We will cover the benefits of a dedicated, private repository, as well as enabling secure, global reach and an analysis of repository options.

Read more

Share Comments

Automated Collection of Diagnostic System Information From Systems You Don't Own

Over time I’ve found there are many reasons why I may be asked to debug systems I do not have convenient access to.

It is painstaking to get lists of diagnostic information in circumstances such as these because it requires a lot of information relaying and lag times.

In the past, I have done a survey of the available options for systems information utilities to help get a dump of a system’s configuration information.

This post discusses the key selection criteria for such a utility and provides automation code (including oneliners) for collecting the diagnostics information with minimal relaying of instructions.


Read more

Share Comments

Logging and Error Handling Best Practices for Automating Windows Update Installs (MSU) with wusa.exe (And For Logging Any Called Process)

Automation of Windows Updates is generally done by calling wusa.exe against a .MSU file. When wusa.exe experiences a failure the messages are typically obscure and hard to diagnose. The underlying error messages, however, are frequently easy to understand and resolve.

The secret is to have wusa.exe do verbose logging in it’s standard exported windows event format and then use the PowerShell event message CMDLets to query that log - automatically, everytime you have an error.

Although focused on applying updates with wusa.exe, this article contains most of my logging best practices for automation coding when calling automated sub-processes.


Read more

Share Comments

PowerShell Core for Windows Chocolatey Package

I have been maintaining the PowerShell Core for Windows Chocolatey package for quite some time, however, since it is a pre-release package, it does not show up on Chocolatey’s search.

This post lets you know it is available and gives the commands for install, upgrade and uninstall.


Read more

Share Comments

The Universal PowerShell Core Installer (Install-PowerShell.sh)

Since PowerShell Core was announced not quite a year ago, I have had a surprising number of reasons to migrate or refit existing PowerShell code to run on PowerShell Core. In some cases keeping future development compatible with both environments adds strategic value.

The PowerShell Core project on github did have an early version of a multi-distro installer, but it required manual tweaks to be updated for each new release and was not using the repository links Microsoft has been putting up.

I believe the ability to quickly setup a sandbox environment is a critical capability for the adoption of any new technology. So, within the PowerShell Core open source project, I set out to build a universal installer that could be used to get the latest version, from repositories (to make updates easier) and optionally install a development environment consisting of Visual Studio Code and the VS Code PowerShell Extension.


Read more

Share Comments

Easy openssl for Windows via LibreSSL Chocolatey Package

The openssl command is frequently used to automate many certificate functions on Linux. I was recently working with a colleague who was very frustrated with the number of hoops they had to jump through to do similar things on Windows. “Why can’t there just be an openssl command for Windows?” was the general sense of their frustrations. Well, there is, but they can be painstaking to get onto a Windows machine for a just a few automation commands. Enter the LibreSSL Chocolatey package…


Read more

Share Comments

Fixed: Non-Functional Start Menu After Sysprep of Server 2016 - Including AWS

At Infor we are increasingly using Server Core due to it’s superior scaling time. However, when I do need to build a server with the GUI - having a non-functional start menu defeats the point. Windows 10 and Server 2016 suffer from a specific sysprep bug which causes the start menu to not pop when the start button is clicked. Here’s how to fix it - including a code snippet for automating the AWS build.


Read more

Share Comments