The PowerShell of the Future

PowerShell Today

Allen White recently presented for CBusPASS about PowerShell. First off, I’d like to say thanks to Allen for driving down from Canton, OH to speak in person. He took the time to stick around afterwards and chat about a bunch of things that were on user group members’ minds. Allen’s presentation covered the basics of PowerShell through concrete examples – automating backups, restores, and database creation. Throughout the entire process, Allen demonstrated many aspects of PowerShell that make the DBA’s life easier. Allen demonstrated how it’s possible to easily work with data from files, the registry, and SQL Server simultaneously through PowerShell. Many of these things would take a considerable amount of work with T-SQL, if they’re even possible at all. Interestingly, one of the first things I was reminded of was how much PowerShell looks like a variety of programming languages, specifically Perl. One of the nicest aspects of Perl is that it’s a glue language. Glue languages help you piece together various pieces and parts of your servers that have no real way to communicate with each other. PowerShell makes it possible to do the same thing, natively, on Windows. PowerShell, as part of the Common Engineering Criteria, is enabled in all of the newer Microsoft server products. So, you can be sure that PowerShell is available as part of SQL Server, Exchange Server, Windows Server 2008, SharePoint, and many other products that I’ve forgotten. This will make it easier to take care of a larger number of servers and diverse server products using a single language. This is the state of PowerShell right now. PowerShell 2.0 is available with Windows 7 and Windows Server 2008 R2. What’s really exciting is PaSH.

PowerShell Tomorrow

[caption id=“attachment_1238” align=“alignright” width=“192”]Object reference not set to an instance of a phone Object reference not set to an instance of a phone[/caption]

PaSH is an open source reimplementation of PowerShell for other operating systems – Linux, OS X, Windows Mobile. Think about that for a minute… Did you really wait for 60 seconds to think about that? Good. With PaSH I could VPN to my network, fire up my PowerShell prompt on my phone, and start diagnosing server problems. Or run a remote backup. Or failover a cluster. Or any number of wonderful and amazing things. Here’s where it gets cooler: If PaSH catches on, we could soon see similar libraries for MySQL or Apache. Maybe someone will even write a layer that maps common Windows and SQL Server functionality to their open source equivalents. A heterogenous datacenter becomes a lot easier to manage when you can write maintenance scripts using a common language across all platforms. Looking forward, this isn’t so far fetched. The open source community has embraced mono, the open source version of the .NET Framework – I have mono and MonoDevelop (the mono IDE) installed on my mac. It’s included in several Linux distributions by default. It isn’t that much of a stretch to imagine PaSH becoming an effective and accepted cross-platform administrative scripting language.