PowerShell poll results

5 Comments

In my SQL Server CMDB webcast this week, I ran a poll: how many of the ~100 attendees had worked with PowerShell?

  • No, but plan to – 40%
  • No, and don’t plan to – 40%
  • Yes, for 0-6 months – 10%
  • Yes, for 6 months or more – 10%

I’m rounding those percentages.  The short story was that 4 in 5 DBAs hadn’t used it yet.  I’m in that group.

I would have loved to have done more polling on this – for example, I’d like to relate the numbers to the size of the shop.  When I talk to DBAs, it seems like the ones in large shops with multiple DBAs are the ones who can really leverage PowerShell.  They need to manage large numbers of servers quickly, and PowerShell rocks for that.

I love the idea of PowerShell.  If it’d been out back in the DOS days when we were all scripting batch files just to get stuff to run, then I’d be Mr. PowerShell.  Windows did need a solid scripting language to facilitate enterprise system administration.

Thing is, I’ve got a limited number of hours in the day that I can use to learn stuff.  If I’ve got one week to learn something new, and my choices are, say, databases in the cloud or PowerShell, guess which one wins?  The sexy one with huge ROI.  If I learn cloud computing, I can start a new online business with nearly zero capital investment.  If I learn PowerShell, I can…script server administration.  <yawn>

That’s why you don’t see me building demos in PowerShell, and why next Thursday in the SSWUG V-Conference I’m talking about log shipping in the cloud.  Log shipping to the cloud is something that works right now, and it’s a great way to dip your toes into some fun new technology.  It’s like virtualization was a couple of years ago: cutting edge, hardly anybody was doing it, and even the people who were doing it were only using it as a disaster recovery (or dev/test) option for SQL Server.  Fast forward to today, and it’s popping up all over the place, because the technology’s gotten better and we’ve gotten better at using it.  Cloud computing is going to have that same initial resistance for a couple/few years, and then it’s going to be much more common.

I was going to end this point by saying, “But if you’re into PowerShell, there’s a presentation at the SSWUG V-Conference for that too,” but as it turns out, there’s not.  Hmmm.  Well, clouds it is!

Previous Post
No, I’m not an MVP.
Next Post
Oracle buying Sun

5 Comments. Leave new

  • Powershell is included in Windows Server 2008 and SQL Server 2008. But many folks are still on Windows Server 2003 and SQL Server 2000/2005. So PowerShell is a separate install that’s not guaranteed to be where you need it. We went through this in my group years ago and realized wscript (vbscript/jscript) wasn’t enough. So we went with Perl. I don’t see us changing any time soon.

    Reply
  • I am learning PowerShell, and very slowly using it to assist my work (so I’m in that 10%)
    And PowerShell already has 2.0 out while people are not even on 1.0

    Funny timing, I believe this is a great start for anybody dipping into PowerShell
    and it fits into your CMDB topic very well too. I have it running against 1 2005 and 1 2000 box to test now, no problems

    The Enterprise Policy Management Framework is a reporting solution on the state of the enterprise against a desired state defined in a policy.
    Extend Policy-Based Management to all SQL Server instances in the enterprise. Centralize and report on the policy evaluation results.
    http://www.codeplex.com/EPMFramework

    Reply
  • I wonder if the results of your poll are really that different when comparing DBAs with other system administration groups (Web, Exchange, Server, etc.). I mean Windows administrators really have never been heavy scripters. There is of course, a big opportunity for Powershell to change this. As far as the value proposition of Powershell for DBAs you touched on one point–multi-server administration but I would say there are at least four additional benefits to database administrators
    1. Makes getting properties easier than T-SQL or SSMS. For example This one line command exposes 97 properties of a SQL instance. It would take many SQL queries or lines of C# code to accomplish the same thing.
    $server = new-object (“Microsoft.SqlServer.Management.Smo.Server”) ‘Z002\SQL2K8’
    $server
    2. Provides a better method for doing tasks outside of the SQL space.
    DBAs need to do things like check disk space, hotfixes, and delete files. These tasks are easy to accomplish with Powershell, but are impossible or ugly to do with T-SQL (hint: if you’re using xp_cmdshell, you probably should look into Powershell). Here’s an example getting disk space
    get-wmiobject win32_logicaldisk -computername ‘Z002’
    3. While SSIS is great at complex ETL, Powershell makes it easy to to automate simple data loads. A Powershell script with a call to BULK INSERT or Data.SqlClient.SqlBulkCopy may be all that is required to load an CSV file.
    4. For administrators thrust into a role who must support databases yet are not DBAs, Powershell provides a common scripting language. Granted this really isn’t of a benefit to a DBA, but probably is for a administrator who doesn’t know T-SQL. See Dan Jone’s post on this subject: http://blogs.msdn.com/dtjones/archive/2008/08/29/powershell-vs-t-sql-or-why-did-we-add-powershell-support-in-sql2k8.aspx

    I’m fortunate to have Powershell installed on all of my SQL Servers, both 2000 and 2005 running Windows 2003, however by just having Powershell on your workstation there are still many tasks you can accomplish using the built-in remoting of SMO and WMI .

    If you’re looking at using SQL + Powershell you may want to check out my Codeplex project http://sqlpsx.codeplex.com which provides over 100 functions for common SQL administration tasks.

    Reply
  • There are definitely advantages to learning PowerShell. I see your point about how Cloud computing could be beneficial. I think for enterprise DBAs, though, PowerShell is probably a better technology to learn first. Cloud computing is probably a long ways away for big enterprises. PowerShell is probably more useful in the short-term for enterprise DBAs. Matter of fact, I think enterprise DBAs should learn PowerShell first. By the time they get the hang of it, maybe all the issues and uses of Cloud computing will have been well documented.

    For me, I have a lot of interest in PowerShell, because Microsoft seems to be building it into so many tools now. They’ve made extensions for SQL Server, Exchange, Data Protection Manager, Operations Manager, etc. Learning PowerShell will probably put you ahead of the game when working with those tools let alone the Windows operating system…

    I’m disappointed there aren’t any PowerShell presentations for th vConference…

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.