When I started my 5 Painless Steps Powershell learning series. It was a smashing success. I was hoping a few dozen people would find it useful. It was viewed by over 2500 people in the first month. Yikes!
The point of the series was specifically to bring more Ops to devops. Learning to program can be daunting and takes a dedication of time. The thing to realize, in my opinion, is that the 5 steps I presented can be applied and learned in any language. Most of the commands are just slight variations from one to the other as well. For instance, some languages use elseif, others else if. There are 2 trains of thought for the for loop, the (init, test, increment) model Powershell uses and the for/next model ($x = 1 to 100) used in basic.
Once the language has been abstracted and is fundamentally interchangeable with any other language, it becomes a framework for shuttling and mutating data. The sources of the data are the exciting pieces to me. We have all kinds of monolithic repositories of environmental information for each of our businesses. Knowing how to program allows us to answer the needs we identify in our worlds. I call them the “wouldn’t it be nice if I had…” solutions.
Wouldn’t it be nice if I could adjust the amount of hard drive space allocated to a backup server in azure based on time of day to allow for the extra space needed for compression while reducing cost over all by lowering classification of the server once the archival is completed.
Wouldn’t it be nice if I could analyze the resource usage over time to figure out when I need to add cores to a server during the day and scale it dynamically.
Wouldn’t it be nice if my environment would auto document itself. None of the off the shelf software accounts for this one odd thing we do.
Wouldn’t it be nice if … fill in your need here.
This is DevOps. As operations technicians, server admins, and/or customer support persons, we have a head full of processes and environmental states that inform the decisions we make day to day. Knowing how to code allows us to build those decision trees using that same data we’d look at from disparate silos of information. Having those decision trees can then be turned into actions based on the outcomes. Those actions can move us toward “click here” administration to an environment which can react to usage and need dynamically.
If we start using historical data, we can even enter the “big data” realm and let our code perform our RCA discovery tasks for us… potentially even auto remediating found cases in the future. This is where we move into the realm of machine learning. It’s not a large leap either. I just got there in 2 paragraphs. All we need to do is remember the simple phrase: EVERYTHING IS POSSIBLE THROUGH CODE.
Any “Wouldn’t it be nice” moments we have are answered by that phrase. When asked if you can make something happen, yes can always be the answer. It’ll be tempered by the time and effort required but there’s always a solution to whatever specific task you’re being asked to explore.
I have 5 posts that I’ll be making shortly that are the “Powershell in 5 Painless Steps” series. I’ll add the links at the bottom here as I get them converted to this blogging platform. I wrote them while I was working at Beyond Impact 2.0, LLC. I’m now with another MSP, Netgain Technologies, Inc. and still use Powershell every single day to make my job easier and more effective.