PowerShell command line embedded into Powershell form. -
is possible to embed shell window appears when open powershell form, inside form itself?
normal form window:

what i'm looking achieve:

is possible? or there methods achieve similar effect?
it depends on you're doing, there few ways solve this. i'm assuming in answer you're creating form in powershell, not powershell window form (which easer manage). if there's have want "click-able", such batch file or shortcut, you'll need reference powershell exe , provide arguments (such location of script), can specify window style (see powershell -- powershell.exe -?). case, you'd want use:
powershell.exe -windowstyle hidden be sure test , ensure forms shell opens visible.
if want create form, , put text on form, there few ways can that, too:
- create control (textblock good), , put data onto control shell, such trace messages come shell user normally
- create powershell process, , hook standard output stream.
i'm not sure how you'd go hosting console window on screen, because things windows , forms managed little differently console apps, run inside instance of conhost.exe.
do of above techniques meet criteria?
Comments
Post a Comment