Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Powershell for DBAs

By Steve Jones,

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.

Total article views: 344 | Views in the last 30 days: 5
 
Related Articles
ARTICLE

Stairway to SQL PowerShell Level 1: SQL PowerShell Basics

What are PowerShell and SQL PowerShell and how do you use them? Level 1 of this Stairway will help ...

ARTICLE

Paging Doctor Powershell

Use Powershell to create a single script that checks over your server and every SQL instance on it t...

BLOG

Where Do I Start with PowerShell?

Introduction This morning I set out to get some information about getting started in PowerShell f...

BLOG

Powershell – Useful Resources

One of my aims at the start of the year was to improve my Powershell and scripting skills. I run...

SCRIPT

SQL Powershell Script to check Server Uptime Remotely

SQL Powershell Script to check Server Uptime Remotely

Tags
database weekly    
editorial    
powershell    
 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones