Reputation: 13990
Does anybody know of a console control that I can use to host a Powershell console in my WPF app? I have a WPF app that is scriptable with Powershell, and I want to allow the user to open up a PS console to type some commands.
Upvotes: 4
Views: 1339
Reputation: 52587
Check out this project:
http://poshconsole.codeplex.com/
Its a WPF based console. You can download the source and check it out.
http://poshconsole.codeplex.com/SourceControl/list/changesets
Upvotes: 2
Reputation: 4458
If you use the System.Management.Automation.Runspaces Pipeline object to interact with a hosted powershell runspace programmatically, you can bind the input commands and output to any controls of your choosing, such as a TextBox for input and a MultiLine textblock for output or some fancier controls as you like.
Here's a link to the CreatePipeline API doc:
Upvotes: 0