Automated Ops

Put down the GUI
and step away from the
Remote Desktop Connection

about me

I’ve been managing SaaS built on Microsoft infrastructure for over a decade. I spend most of my time trying to figure out how to replace humans with automation.

recent public projects

Status updating…

found on

Humanize Follow-up

- - posted in .net, powershell, tools | Comments

Humanizer helps you generate some nice output, but it’s kind of a pain to use in PowerShell. You can use Update-TypeData to make the syntax easier to work with. Then, your code starts to look more like the examples on the project’s site.

Here’s a simple example.

1
2
3
4
5
6
7
8
9
10
Add-Type -Path C:\Humanizer\Humanizer.dll

Update-TypeData -TypeName System.Int32 `
    -MemberType ScriptProperty `
    -MemberName ToWords `
    -value {[Humanizer.NumberToWordsExtension]::ToWords($this)}

PS C:\temp> $int = 1234
PS C:\temp> $int.ToWords
one thousand two hundred and thirty-four

Humanize Your Scripts

- - posted in .net, powershell, tools | Comments

This is a quick example of some of the stuff you can do with Humanizer to make your script’s output a bit more user friendly.

Strings from numbers.

1
2
3
4
5
6
7
8
PS C:\temp> [Humanizer.NumberToWordsExtension]::ToWords(2)
two

PS C:\temp> [Humanizer.NumberToWordsExtension]::ToWords(253)
two hundred and fifty-three

PS C:\temp> [Humanizer.ToQuantityExtensions]::ToQuantity("box", 4)
4 boxes

Book Review: Thinking, Fast and Slow

- - posted in books, decision-making | Comments

I finished this book a few weeks ago and have struggled with how to write a review. Thinking, Fast and Slow by Daniel Kahneman is the most epic self-help book I have ever read. It’s also different in the fact that there is no “do this or that to live a better life” type advise, but simply over 400 pages of examples of hour your brain can fail you in so many situations.

Test All the Things

- - posted in .Net, PowerShell, Psate, Testing, Tools, WatiN | Comments

This is a follow-up to my last post on using PSate for test automation. I demonstrated running Invoke-WebRequest and validating the StatusCode as a simple test for if a site is available. Now let’s take it to the next level and run an artificial transaction. Again, PSate is a handy test runner to manage this and the open-source project, WatiN (pronounced as What-in) is a great tool for automating a real browser.

Test It With Psate

- - posted in PowerShell, Psate, Testing, Tools | Comments

Recently I have been putting effort into learning the art and science of unit testing using Pester and PSate. I was going to write up something on my experiences, but Jakub JareŇ° beat me to it with this good article on PowerShell Magazine. If you are new to the idea of unit testing, go read that article and then come back here.

So, what is the point of this article? I was working on an unusual maintenance recently and it was around 4 in the morning and it occurred to me that it would be nice if I had a big dashboard that showed everything was “green”.

One Year

- - posted in blog, devops, opinion | Comments

I happened to look through all of the previous posts today and found that 2/25/2013 was my first. So, that makes a year and by no conscious effort, 52 posts—one a week on average. The site receives about 500 visits a month from over 40 countries.

Book Review: The Checklist Manifesto

- - posted in Books, Checklists | Comments

I thought I would try something new for this post, a book review.

I recently read The Checklist Manifesto: How to Get Things Right and it was one of the best non-fiction books I have ever read. That’s the short of it. Go read the book.

If you are still not convinced, here is a bit more about the book and why I feel it’s a top read for anyone who thinks this blog is even slightly interesting.

Close of the 2014 Powershell Scripting Games

- - posted in PowerShell, Scripting Games | Comments

So, the 2014 Winter Scripting Games have concluded and I feel like putting my two-cents out there, however, my participation this round was very limited.

The Good

I really liked the team based games in theory. I think it was a good way to force use of good behavior since several people were working towards one ultimate module. You needed to build modular code that was readable and reliable.

Tools: Boxstarter

- - posted in PowerShell, Tools, Windows | Comments

If you have not yet tried out Boxstarter you owe it yourself to give it a look. Boxstarter is a Windows software installation and configuration module that automatically handles the frequent reboots involved when building a new Windows system.

As you’ll see from the site, Boxstarter makes use Chocolatey as the primary source for software packages. There are a couple big advantages to using Boxstarter instead of the basic Chocolatey module.

The Games Have Begun

- - posted in Powershell, Scripting Games | Comments

Acceptance of entries for the Practice Event of the 2014 Winter Scripting Games has closed and there is a brief pause in the games for the Judges to test out the scoring system. There is a unexpectedly high number of teams registered. My unscientific estimate is that there are at least as many teams as there were individuals in the previous games. That is pretty significant growth considering any teams with less than 2 members were deleted. Looking through the entries, I see a lot submitted no files. My team was one of those, but we did use the time to figure out collaboration and coordination.