Windows PowerShell

Presented: Thursday, August 21, 2008 - 6:45pm
Location: EdFinancial Services, 150 N Seven Oaks Dr, Knoxville, TN
Presenter: James Kolpack, Software Engineer, Jewelry Television

PowerShell, Microsoft’s long awaited interactive command line scripting language, has finally arrived. It features an object-based command shell integrated over the .NET framework. Borrowing from the Unix model, PowerShell contains a large number of small operations that, when combined in interesting ways, can quickly and easily tackle complex tasks. But unlike Unix, which uses byte streams to pipe data between commands, PowerShell uses object to communicate between its “commandlets” - lending new possibilities to this proven method. PowerShell also includes a rich dynamically typed scripting language, built-in data structures, regular expressions, and it is easily integrated with new applications.

But first - why would we need a tool like PowerShell? When working on a Windows platform, system admins and developers have never had a native scripting language with much power or grace. The Cmd shell can be useful for simple batch operations - but it is ultimately crippled by lack of visibility into the depths of the OS. VBScript somewhat addressed this need for a complex scripting language - it now has extensions giving access to XML, ADO data structures and IIS. These capabilities have been cobbled over of the language over course of 10 years - they can often be cumbersome and non-consistent. On top of this, some administrative tasks can only be performed inside a GUI. PowerShell was written with the intent to solve these problems.

The development team behind PowerShell have coined the term “Admin Development Model” to describe their design directive. In this model development occurs in three phases. The first could be thought of as “hair on fire” mode - you’re needing to get something done quickly and who cares what short-cuts you need to take. The next mode, presumably after the flames subside, you’ve got some time to look over the damage and develop some robust scripts based around the quick fixes. Finally, it might be that the scripts serve a business need - you could encapsulate the functionality in a nice GUI that anyone in your organization could use.

In this presentation we will be exploring PowerShell in a hands-on overview and interactive demo. We will cover the interactive shell, the scripting concepts, and GUI integration. Whether you’re a systems admin, developer, script wizard, troubleshooter, or average Windows desktop user, PowerShell can be a powerful tool in your technology arsenal.