SQLServerCentral Editorial

Powershell for DBAs

,

A few weeks ago I attended SQL Bits and noticed there were a number of people talking about using Powershell (PoSH) with SQL Server. Laerte Junior have a troubleshooting talk and Allen White talked about maintaining performance. I've started to notice more and more people are showing Powershell as a tool to accomplish repeatable tasks, run across multiple servers.

I've struggled to use Powershell much in my work, but I don't have a lot of repeatable tasks in SQL Server. I tend to be more like a consultant, with a lot of ad hoc work that varies across different instances. However I do have scripts I run regularly, like the sp_Blitz script, and these are exactly the type of tasks that work great in Powershell. As I start to work in Azure, scripting is important and I can see the value in using something like PoSH that is easily dropped onto a new machine to perform a variety of tasks, like configuring SQL Server.

This week I saw a post on getting started in Powershell and it reminded me that I should be improving my skills. I might not use them often, but more and more content, and automation examples use Powershell and being able to read and understand it will become more important. That might especially be true if you find storage or system administrators wanting to run PoSH on your database servers. I'd hope you would understand what they planned to do before they do it. Or you can backtrack and understand what they changed with their script, which might not be what they tell you they changed.

I don't know that Powershell will be required at most, or even many, companies. However I do know that Microsoft is pushing it, it's not hard to learn, and it's handy. If I were back in a situation where I was managing 10, 20, or more instances, I'd want Powershell to help me handle the basic, tedious tasks. At some point those easily automated tasks won't be worth paying someone to do. If you can't add value in other ways, you might find yourself struggling to maintain employment.

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating