Join James Brundage, Tester from the Windows PowerShell team, and Bruce Kyle for a quick introduction to how embed PowerShell within your C# application.
See how you can easily reference the PowerShell assembly and start embedding PowerShell cmdlets inside of a C# application with PowerShell V2.
/* Calls the Get-Process PowerShell command and returns the output as a string */
foreach (string str in PowerShell.Create().
NOTE: You'll need to add a reference to the version of PowerShell you have installed in your GAC to the Visual Studio project file. To do so, you'll open the project file as a text file and add the following line into the <ItemGroup> section:
<Reference Include="System.Management.Automation" />
For more news, tips, and links to developer training, see the US ISV Community blog.