Chapter 13. PowerShell

PowerShell (or Windows PowerShell) is the name that Microsoft gave its new extensible command-line interface shell and scripting language. PowerShell has gone under other names before being released — Microsoft Shell, MSH, and Monad. These terms are now obsolete and have been superseded by PowerShell.

This chapter introduces PowerShell and looks at how VBScript programmers can leverage the power offered by this new shell and scripting language.


Microsoft PowerShell is based on object-oriented programming and version 2.0 of Microsoft's .NET Framework and is available for Windows XP SP2, Windows Server 2003 R2, Windows Vista, and Windows Server 2008. It doesn't ship as default with these operating systems but you can download it from Microsoft (

It is expected that future versions of Windows will ship with PowerShell by default.

PowerShell is supported on x86, x64, and IA64 architecture, requires the .NET Framework version 2.0, and is the basis for administrative tools for the following products:

  • Exchange Server 2007

  • System Center Virtual Machine Manager 2007

  • System Center Operations Manager 2007


Here are some of the features present in the initial release of PowerShell:

  • PowerShell is free. Microsoft has no plans to charge for this feature.

  • PowerShell is a C#-like scripting language. It has support for the following concepts:

    • Regular expressions

    • Switch statements

    • Array manipulation ...

Get VBScript Programmer's Reference, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.