Click here to Skip to main content
15,888,142 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello
I writing PS GUI app for some scripts. I using from beging to end only powershell with xaml reader to do this. And my question is this possible to embed powershell host in it?
As you can see on image i can execute any PS cmdlet and with out-string see the results in string in textbox. But it will be much better if I can stream my cmdlet to this embedded host and manipulate it in any way. I know that I can show it on powershell which is behind app but it's not my goal.

IMAGE[^]

Red rectangle is place where I need powershell host.

Blue rectangle is place where cmdlet are given by button or by textbox.

What I have tried:

I tried the console solution but it's not for me.
Posted
Updated 6-May-16 8:47am
Comments
Sergey Alexandrovich Kryukov 6-May-16 14:17pm    
Any compelling reason to get all this trouble? Do you understand that there is nothing which you could do using PowerShell which could not be done by using .NET application?
—SA
KamilTee 6-May-16 15:20pm    
@Sergey
I don't have any trouble with executing command or as you can see get results on my textbox. I know this, but my case is to have a PShost ebeded in app with "livestream" of what is going on now "behind the scene" when I hit the button. Something like PowerShell ISE got.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900