Management.Automation.Host : This contains the classes, enumerations, and interfaces
that a cmdlet uses to communicate with the host application.
??‘ System.Management.Automation.Runspaces : This contains the classes, enumerations,
and interfaces used to create a runspace. This allows for a Windows PowerShell pipeline to
run cmdlets.
??‘ System.Collections.ObjectModel : This contains classes that can be used as collections.
This isn ??™ t specific to Windows PowerShell, however it proves useful to the examples used
in this chapter.
487
Chapter 17: Using the .NET Framework
Figure 17-1
Now that the SDK is installed, the required library is referenced and the directives are added, so you can
start accessing PowerShell from your web project.
The Windows PowerShell Runspace
If you aren ??™ t a programmer or have no experience with programming, you might find the next few
paragraphs confusing. Here are a few definitions to help you out:
??‘ A class is a container of properties, functions, and behaviors that describe an object.
??‘ An object is created from a class and is assigned properties and values.
??‘ A method is a piece of code that can be run. A method is usually a discrete action that can be run.
After adding the directives, Default.aspx.cs should look similar to the file shown in Figure 17 - 1 .
Pages:
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677