Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


September 19, 2006

Getting Started with Windows PowerShell

RSS
Subscribe to Windows IT Pro | See More Scripting Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

If asked to call out the single major difference between Windows and UNIX--and let's leave calls of "uptime" for the laugh track, please--I guess I'd have to go with the command line. UNIX was built with a command-line interface (CLI) as the default, whereas the CLI in Windows is decidedly an afterthought. Windows, instead, puts the GUI first.

Much of that difference has more to do with timing than anything else. Windows simply came of age in the era that began with the Macintosh; UNIX, of course, predates the GUI. Today, most experienced UNIX administrators are CLI experts of some sort, able to rattle off complex scripts in their sleep, though of course most are beholden to curious CLI environments and even particular text editors. It's all part of the culture.

On the Windows side, most administrators are familiar with the admin tools that ship in Windows and with various Microsoft and third-party management tools. Truly experienced Windows administrators are at least passingly familiar with the Windows CLI, and various scripting environments. But they've been hobbled by the unsophisticated nature of the MS-DOS-based CLI in Windows and the fact that it hasn't been seriously updated in more than a decade.

Well, no more. Microsoft has created a new CLI, the Windows PowerShell (previously code-named Monad) that offers a best-of-both-worlds compromise between the power of UNIX CLIs and the discoverability and usability of Microsoft .NET-based programming languages. PowerShell, put simply, is the CLI done right. And if you're looking to enhance your administrative toolset and, ultimately, your marketability, this is something you'll want to look into.

Like many Microsoft technologies these days, PowerShell has been developed outside of any major Microsoft products, but it will ultimately be integrated into various products and, eventually, Windows itself. In the meantime, you can download a near-final version of PowerShell and install it on various Windows Server 2003 versions (including the x64 versions and R2), Windows Vista, and Windows XP. It requires .NET Framework 2.0.

Although PowerShell should ship as a standalone product by the end of the year, its first major appearance will be as part of Microsoft Exchange Server 2007. As I've discussed before in Windows IT Pro UPDATE, Microsoft has engineered Exchange 2007 as if it were a UNIX server. The management GUI is a subset of what's available from the PowerShell-based command-line tools. Amazing.

PowerShell might still be included as part of Longhorn Server, currently due in the second half of 2007. Presumably, it will be included in post-Vista Windows client and server systems.

Here's why PowerShell is exciting. First, it's consistent and logical. Say what you will about .NET, but the .NET Framework is a model of consistency, and PowerShell takes the same approach with its own .NET-based language (complete with all the arithmetic operators, assignment operators, variables, methods, and other features one would expect of a scripting or software-development language) and object-oriented namespaces. PowerShell improves on UNIX CLIs by offering consistent output: Everything that provides output in PowerShell is predictable, making it easier to build complex scripts. PowerShell is also discoverable. If you don't know the properties of a particular method, for example, PowerShell can display in-place lists of those properties so you can find the right one. And it supports Tab-completion of keywords.

Next week, we'll look at some specific PowerShell examples. In the meantime, here are a few resources to get you started:

Microsoft PowerShell Team Blog
http://blogs.msdn.com/powershell/

Windows PowerShell (includes RC1 download)
http://www.microsoft.com/downloads/details.aspx?FamilyId=2B0BBFCD-0797-4083-A817-5E6A054A85C9&displaylang=en

Exchange 2007 Script Center
http://www.microsoft.com/technet/prodtechnol/exchange/2007/scriptcenter.mspx

End of Article



Reader Comments

You must be a registered user or online subscriber to comment on this article. Please log on before posting a comment. Are you a new visitor? Register now




Top Viewed ArticlesView all articles
2009 Windows IT Pro Editors' Best and Community Choice Awards

Picking a favorite product from an impressive crowd of competitive offerings is never an easy task, and such was the case with our Editors' Best and Community Choice awards this year. ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

WinInfo Short Takes: Week of November 23, 2009

An often irreverent look at some of the week's other news, including some post-PDC some soul searching, a Google Chrome OS announcement and a Microsoft response, Windows 7 off to a supposedly strong start, the Jonas Brothers and Xbox 360, and so much more ...


Related Articles PowerShell Scripting

Scripting Whitepapers From Development to Production: Streamlining SharePoint Deployment with DocAve Deployment Manager

Related Events Deep Dive into Windows Server 2008 R2 presented by John Savill

PowerShell 201 - eLearning Series with Paul Robichaux

7 Ways To Get More From Your SharePoint Deployment Now

Check out our list of Free Email Newsletters!

Scripting eBooks Keeping Your Business Safe from Attack: Encryption and Certificate Services

Best Practices for Managing Linux and UNIX Servers

Building an Effective Reporting System

Related Scripting Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement