NET Framework. After installing
the Windows SDK along with the required Windows PowerShell components, create a new C# ASP.NET
web application project in Visual Studio 2005. Start Visual Studio and create a new C# web project.
Then you will need to add a reference to System.Management.Automation.dll in your web project.
The Windows PowerShell SDK assemblies are installed by default in C:\Program Files\Reference
Assemblies\Microsoft\WindowsPowerShell\v1.0\ . To add a reference from within Visual Studio,
click the Website menu, then click Add Reference. Click the Browse tab and then navigate to the location
of the System.Management.Automation.dll and click OK.
In your newly created web project you will be able to open the Default.aspx.cs file and add several
of the following directives to your code to reference the PowerShell libraries as well as the Collections
.ObjectModel library:
using System.Management.Automation;
using System.Management.Automation.Host;
using System.Management.Automation.Runspaces;
using System.Collections.ObjectModel;
The following list describes what each of these namespaces does:
??‘ System.Management.Automation : This is the root namespace, and it contains the classes, enumerations,
and interfaces required to create customer cmdlets.
??‘ System.
Pages:
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676