8

Does a clean install of PowerShell on its own have enough functionally to Admin a Windows domain environment and/or SQL Servers?

If not what are good, free or pay for, third party add-ons?

8 Answers 8

8

To answer this question, you need to zoom out to the bigger picture and ask what it means to administer Windows and SQL Servers. For example, how many of these other things do you have in your environment:

  • Third party backup products like NetBackup or BackupExec
  • Antivirus products
  • Storage tools
  • Firewalls or web filtering software
  • Hardware alerting (like IBM Director or HP SIM)

All of these things have their own mechanisms for management, and since PowerShell is still relatively new, not all services will be PowerShell-enabled. For now, you may need to jump out of PowerShell in order to manage things like those.

On the flip side, there's no other language that works better across all of those Windows tools either.

When you say "functionality to administer servers", that doesn't come from a Windows language yet. In the *nix world, you can stay inside a scripting environment, but the Windows world isn't quite there yet.

6
  • 2
    I disagree. I think PowerShell contains the functionality to "administer servers" and where it might be lacking specific cmdlets, it can still take advantage of existing console applications, COM apps, and .NET assemblies. Some of that will require work to develop the solution, but the longer PowerShell is out, more refined solutions will be available. Apr 30, 2009 at 16:45
  • Right, like you said, it will still require work to develop your own solution. We're heading toward the day where you never have to leave PowerShell to do your job, but we're not there yet, would you agree?
    – Brent Ozar
    Apr 30, 2009 at 18:07
  • I'm much closer to agreeing to that. Maybe I'm hung up on semantics, but "leaving" PowerShell to me means leaving the shell or script or host, which is not necessary. If we define "leaving" PowerShell as stepping away from cmdlets, then I agree. :) Apr 30, 2009 at 18:22
  • I'm not sure I agree. If you can administer with WSH, Perl, or C# (through WMI, Windows APIs, 3rd party dlls, etc.) then you can do the same in PowerShell with the same or less code.
    – Wedge
    Apr 30, 2009 at 19:41
  • Right - you can't administer Windows completely through ANY language, like I said. "There's no other language that works better across all of those Windows tools either." That's what I said.
    – Brent Ozar
    Apr 30, 2009 at 21:43
4

The answer to your first question is a resounding "YES".

To manage an existing Windows domain, "vanilla" PowerShell (no additional snapins) provides out of the box support for WMI, ADSI, COM, and .NET.

Managing remote machines is handled through WMI (or COM / .NET depending on the use case).

Managing SQL Server can use the SMO libraries (see the SQL Server PowerShell Extensions for ideas). You can access data via ADO.NET.

To answer the second part of your question, as to what are good third party addons, really depends on what you need to do. As John Cook mentioned, the PowerShell Community Extensions are a great general addition. There are many, many others. PowerShellCommunity.Org has a number of great references for third party products and Codeplex has a great number of open source PowerShell projects.

More Microsoft products are adding PowerShell support (like SQL Server 2008, Exchange, Active Directory, etc..)

V2 (which is getting near) contains some great remoting and background job capabilities.

3

Powershell doesn't ship with SQL administration tools, although you could continue to use things like osql or isql. I know there are Powershell addins that let you "mount" a SQL server and navigate it like it was a file system (much like the Registry stuff that's built in).

1
  • 1
    Starting with SQL Server 2008, there are native PowerShell cmdlets and a provider. Apr 30, 2009 at 16:33
2

The PowerShell Community Extenstions (PSCX) are free and convenient to have.

1

By itself and on your own, PowerShell is not enough.

But PowerShell is not alone, and neither are you. There are extensions such as John D. Cook mentions above, as well as a vibrant community sharing what they learn about it.

It's made to be easily and constantly extended, and gives you access to COM and .NET objects necessary to administer whatever you like.

0

There is always Perl. :) For SQL Server DBAs, see Linchi Shea's book.

0

I've really found the Quest ActiveRoles snap-in to be very useful for working with and managing Active Directory. You can get the snap-in here, but I think this blog post does an excellent job explaining what it is, how to set it up, and how to use it.

0

As a DBA in a rather large environment, my opinion is YES. We have built an entire MS SQL Server monitor and maintenance framework using nothing but PowerShell 1.0. This system automates daily capacity monitoring as well as automating backup index maintenance etc.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .