PowerShell and DevOps

First of all, welcome to the dark side. If you read any blogs, news, follow people in twitter for technical reasons not what Kardashian is wearing today you have seen the industry talking about DevOps, DevOps, DevOps…..

But what it really means to you and your organization? The concept is simple to explain the execution is what is really hard because involves people rewiring their brains about IT operations. In a nutshell, it means that an organization needs to become agile and deliver products faster though code and it means you have to be able to spin up environments using code without any human intervention. Of course, there is a lot more but for this blog post we are going to focus what it means to you and your “CODE” formerly knows as scripts.

Keep in mind you are writing code to automate a task in your organization and make repeatable. Your goal should be to recreate your whole infrastructure from code. Yes it is going to be hard, and it is going take time that is why we are IT Pros but the end your life is going to be easier, I like to be lazy and let my code do the work. You are wondering right now well I want to do it but where do I start ?, what tools do I need ?, how do I convince my peers and management to adopt this DevOps thing. Well like for almost everything in life start small, remember crawl, walk, run, jump.

The first thing you need to do is treat your code with respect. This means follow the “evil developers” practices on code and source control. If you write code in the PowerShell ISE stop !!!!. Do not get me wrong it is a great tool but is not a developing tool, for example you don’t have integrated source control out of the box.

I am going to mention some professionals tools or add-ins that you can use to write PowerShell code  professionally. Which tool is the right for you will depend what are you comfortable with but I personally like Visual Studio Community edition is free and it does what I need it to do

  • Visual Studio Community. You have to to add PowerShell extensions when installing  Here
  • Visual Studio Code. You can add PowerShell and Chef extensions. Here
  • Primal Script from Sapien Here

the IDE is just the half of the battle . The second part to this having a central repository where your company keeps the code and have version control. If your company already use source control ask them to give you access to a repository but keep in mind there is a big wave of people using/moving to GIT.

Now if you don’t have any repositories in your company and do not want to learn how to configure a GIT server, use GitHub they have a free version and a pay version. I will have a later post regarding version control.

Having you code version control is the first step into DevOps, it is time to grow up and embrace the new changes coming  to the enterprise. Yes there is a lot to learn but one step in the right direction is the a great way to start the DevOps journey.




Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s