Hi,
is it possible to open a powershell window by clicking a button. The powershell window should be in the same session like the GUI. With tith one i would to migrate my scripts in one Powershell GUI.
Open Powershell CMD Window from GUI
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: Open Powershell CMD Window from GUI
Currently there is no straight-forward way todo this. It can be done with advanced programming techniques.
You can display a textbox that you can type into then process the text as a command.
It you type the following into a textbox:
Get-Content c:\windows
Then process it like this:
$files=Invoke-Expression $textbox1.Text
The code will be executed.
You can display a textbox that you can type into then process the text as a command.
It you type the following into a textbox:
Get-Content c:\windows
Then process it like this:
$files=Invoke-Expression $textbox1.Text
The code will be executed.
Re: Open Powershell CMD Window from GUI
Hi,
thanks for your answer. You wrote from advanced programming technology. Is your example with the textbox a advance programming technic?
Is it possible to open a separte Powershell session and transfer some variables to the new session? If i open a new session - i have to add all modules a second time (with the same time for loading)?
thanks for your answer. You wrote from advanced programming technology. Is your example with the textbox a advance programming technic?
Is it possible to open a separte Powershell session and transfer some variables to the new session? If i open a new session - i have to add all modules a second time (with the same time for loading)?
Re: Open Powershell CMD Window from GUI
No, but it is not exactly what you asked for.derhoeppi wrote:Hi,
thanks for your answer. You wrote from advanced programming technology. Is your example with the textbox a advance programming technic?
Is it possible to open a separte Powershell session and transfer some variables to the new session? If i open a new session - i have to add all modules a second time (with the same time for loading)?
- dan.potter
- Posts: 709
- Last visit: Wed Nov 14, 2018 11:39 am
Re: Open Powershell CMD Window from GUI
derhoeppi wrote:Hi,
is it possible to open a powershell window by clicking a button. The powershell window should be in the same session like the GUI. With tith one i would to migrate my scripts in one Powershell GUI.
Why would you want to do this?