Oct 25 2017 05:22 PM
Looking for a (free?) GUI form frontend for scripts that I want to distribute to users.
Basically, I want to gather three or four data points.... such as first name, lastname, domain name, and country in a GUI form, which then passes these to parameters or variables in the Powershell script.
As a bonus it would be great to be able to display results within the form, such as a message, "successfully submitted" or the like. Shouldn't a PowerApp or another technology within Office 365 be able to do this?
Thanks. --- Larry
Oct 25 2017 11:35 PM
PowerShell supports this natively, you can get the input directly as prompts in the script, or if you want you can build a real UI with buttons and other controls. An easy to use tool is the PoshGUI project: https://poshgui.com/
There are also "professional" solutions, look them up.
Oct 26 2017 06:12 AM
Vasil,
Many thanks for the PoshGUI reference. That looks promising. I did look into Powershell Studio from Sapien...which is really wonderful, but pricey, and I'm using PowershellPlus as my normal development environment right now. --- Larry
Oct 26 2017 06:16 AM
Oct 27 2017 09:56 AM
Apart from password prompt, there are few other built-in methods you can invoke. Check them via
$host.ui | gm
Nov 02 2017 08:54 AM
If you're talking about reusable and repeatable, then ShowUI is an interesting choice. Also, you can go native winforms. PowerShell studio is a pay-for product, but really good if you go down this road.
Finally, you could just use the builtin show-command. The trick is to create an advanced function with the appropriate parameters for your input. Ideally, you turn it into a psobject and pipe it to your next command that expects this as an InputObject. Here's an example of grabbing some input, executing, and displaying the object you created to the screen:
function get-something { param( [Parameter(Mandatory=$true)] [string] $Name, [Parameter(Mandatory=$true)] [string] $Occupation ) new-object psobject -property @{ Name=$name Occupation=$occupation } } iex (show-command get-something -passthru)
Nov 02 2017 09:13 AM
Thanks all for the suggestions.... I'm looking forward to trying out the various approaches. I did use PowerShell Studio for awhile...back a couple years ago.... wanted to see what might have become available since. ----Larry
Nov 28 2017 11:29 AM
Dec 05 2017 02:18 AM
You could use simple SPO form (custom list) , create a columns for:
All data will be saved to this list and you can export it to excel sheet.
The form would look like below: