3.1. A New Architecture

PowerShell 1.0 implements a significant new architecture, different from any preceding Microsoft command shell. First, it is based on the .NET Framework version 2.0. Second, instead of the traditional approach of command shell pipelines, which often pass strings or text from one application to another, the PowerShell approach is to pass objects, rather than text, along the pipeline. In PowerShell the objects are .NET objects.

3.1.1. .NET Framework-Based Architecture

It probably bears repeating that one of the most significant changes in PowerShell as a command shell is that it is based on the .NET Framework 2.0. Among the relevant features of the .NET Framework are

  • Reflection

  • Network awareness

  • Rapid application development

In the context of PowerShell, reflection is particularly important. You can find the members of any .NET class at runtime using the get-member cmdlet. For example, to find the members of running processes that you can work with, use the following command:

get-process |
get-member |
more

The get-process cmdlet, in the first step of the pipeline, returns System.Diagnostics.Process objects and passes these to the next step in the PowerShell pipeline. In the second pipeline step, the get-member cmdlet returns objects representing the members of the System.Diagnostics.Process class. This process is enabled through .NET reflection.

Windows PowerShell provides a syntax that allows users to make use of static members any .NET Framework 2.0 class. ...

Get Professional Windows® PowerShell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.