14.1. Windows PowerShell and the .NET Framework

Unless you have jumped straight into this chapter, you already know that Windows PowerShell is founded on the .NET Framework and that cmdlets and the objects passed along a Windows PowerShell pipeline are .NET objects.

Windows PowerShell provides syntax that allows you to create .NET objects and then explore the members of those .NET objects. You have seen many examples in earlier chapters of using the get-member cmdlet to explore the members of objects. In this chapter, I introduce you to using the new-object cmdlet to create new .NET objects. Using such techniques for creating and exploring .NET objects, you can create many useful scripts by combining them with other aspects of Windows PowerShell functionality.

To be able to get full advantage from the .NET functionality of Windows PowerShell, you need to have a good understanding of the parts of the .NET Framework 2.0 classes that are relevant to your needs. The scope of the .NET Framework 2.0 is huge, so I can only illustrate in this chapter the kind of things that you can do.

There are several sources of information on the .NET Framework 2.0. Two useful sources of information are Visual Studio 2005 help and the .NET Framework 2.0 Software Developer's Kit.

If you have access to an edition of Visual Studio 2005, you can access large quantities of useful information on the .NET Framework 2.0. With Visual Studio 2005 open, select Help Contents. After a pause the Microsoft Visual ...

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

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