How to Embed PowerShell Within a C# Application

Play How to Embed PowerShell Within a C# Application

The Discussion

  • User profile image

    One thing I'd be really intreasted in is any guidance on how to make my apps manageble by powershell, how to handle communication from the cmdlet to the app etc.  At the moment I have a WCF service I call from the powershell command but am intreasted on how others do it.





  • User profile image

    Why didn't you guys use a tripod? The tiny screen in the video is very hard to read and the camera shake makes it even harder. Fortunatelly, the code was posted to the right of the video (and the subtitles helped, too), because it was nearly impossible to make it out on the screen. In the end, I think this entire exercise would have been better as a post to a blog.

  • User profile image

    How to handle the scenario of calling Exchange Server 2010 Commandlets and powershell commandlets in C# ??


    Exchange Commandlets require remote runspace to be created for them to run. By doing so, we will not able to run powershell commandlets like "Where-Object" in the same runspace.


    Creating a local runspace would enable us to execute powershell commandlets and not Exchange 2010 commandlets.


    We can maintain separate runspaces, one local runspace to run powershell commandlets and one remote runspace to run Exchange 2010 COmmandlets.


    But, How to execute a pipeline of Exchange 2010 commandlets and powershell commandlets like this: "Get-ExchangeServer | Select-Object Name" ??

Add Your 2 Cents