VMware Cloud Community
barnette08
Expert
Expert

Form or GUI to Pass Input

I am working on trying to simply VM deployments for a handful of our lab team members (fairly small team), so that everything is on one screen.  I was wondering if there was a way to have an HTML form or GUI that has a mix of drop-downs and input boxes that take all the information and execute the script and pass all the input when selecting a finish button.  I have spent a while googling and figured it would probably just be better to ask for some input from the community about what you guys think is the best approach.

The reason I mention an HTML page is because it's fairly easy and its the code that I'm most familiar with, but I'm sure you guys have some thoughts about the best way to accomplish this.  Any feedback would be great!

0 Kudos
2 Replies
LucD
Leadership
Leadership

You can use a HTA form to do this, but there are some drawbacks.

See for example Using a HTA as a PowerShell GUI

The alternative is to use Windows Forms (see for example Building GUI Applications in PowerShell) or WPF (see for example I've Got a PowerShell Secret: Adding a GUI to Scripts).

For the last 2, it might seem daunting to write the code to create the form, but you can use Visual Studio Express, design the form in wysiwyg and then use the generated code to help you in writing the PowerShell code.

There used to be the free Primal Forms Community Edition from Sapien, but that has been discontinued I'm afraid.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

barnette08
Expert
Expert

Thanks for the direction, I will dig into these and report back after some time and more research.

0 Kudos