PowerShell command line embedded into Powershell form. -


is possible to embed shell window appears when open powershell form, inside form itself?

normal form window:

powershell form

what i'm looking achieve:

enter image description here

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:

  1. create control (textblock good), , put data onto control shell, such trace messages come shell user normally
  2. 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

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -