SQL Server 2008 + PowerShell = NO NO NO NO NO!
Note: I’ve posted a follow-up with some additional thoughts. Uses SQL Server 2008 RC0.
This blog post has me seeing red. In it, the SQL Server 2008 team demonstrates their complete and utter lack of “get it” when it comes to Windows PowerShell. As you may know, SQL2008 is in Community Technology Preview (CTP) number 6, and they’re delivering a Windows PowerShell provider and cmdlets. The point of the cmdlets is for administration, not data manipulation; that’s fine, because SQL has a great scripting language (T-SQL, which it’s had forever, literally) for data manipulation (and it’s not so bad at most admin tasks, either, really).
The PowerShell cmdlets are likely being built on SQL Management Objects (SMO), a .NET Framework class set that was introduced in SQL2005. You’ll apparently be able to use PowerShell in SQL Server Agent job steps, which is mega-cool, and PowerShell v1 is a pre-requisite for installing SQL2008.
But they have created a SQL Server-specific version of Windows PowerShell, which is what you use if you want to use SQL Server 2008 cmdlets or the new provider. And this new console is closed - you cannot add more functionality to it by using Add-PSSnapin.
To say that this is “stupid” would be unkind to all the stupid people out there. This “closed console” is stupid on a level heretofore unknown. The SQL team is basically taking a great, all-purpose administrative tool and locking it down. They’re returning us to the good old days of Windows NT, when everything was administered by its own, separate, non-integrated admin tool. THIS SUCKS.
Even better? Some collection names - e.g. ,”Databases,” as in $server.Databases - are case-sensitive, in defiance of everything else PowerShell does. Some of PowerShell’s built-in discoverability features are broken in this closed console, removing the ability to work with individual snap-ins, for example. COULD THIS SUCK ANY MORE?
The SQL team seems to be so inwardly-focused and out of touch with what administrators do that they’ve really limited the possibilities for their work to be, um, useful. For example, by forcing me to use a closed console, they’re eliminating the ability to make SQL-related tasks a part of broader provisioning processes and other business processes. To mess with SQL, you have to be in the Special SQL Shell, and when you’re there you can’t have any other functionality. Just SQL. WHY??????
I wish I were kidding. The SQL team is clearly not only talking to other teams which have done a great job of working with PowerShell - System Center, Exchange, etc - they don’t even seem to know that these other teams exist within Microsoft. Right on campus. Just down the road. Go eat lunch with them for heaven’s sake. Order a side of clues.
This “closed console” business is depressing. I’m hoping someone at Microsoft with some clout can make folks on the SQL team see reason. They’re doing things that don’t make sense, don’t fit the model, and just… ugh. You know, it’s just hubris. Did anyone on the SQL team think to ask, “gosh, why is everyone else using the base shell instead of making their own closed shell?” Or did they think they’d discovered a solution to a problem that… um… nobody else has ever heard of?
Your comments, please. Maybe a public outcry will help folks in Redmond see reason.
(BTW, I basically asked “WTF?!?!” about this on the private Admin Frameworks MVP mailing list - hoping that there was a logical reason for this closed console decision, and that I was missing something. The responses were basically along the lines of “Yeah, they don’t get it,” so if there IS a logical reason, none of the PowerShell MVPs have been let in on the secret, yet).�


