

He is also a moderator on the Hey, Scripting Guy! forum and a regular speaker at Bangalore IT Pro user group meetings. In an earlier blog post, Ed Wilson showed us how to create GUI using Windows PowerShell and SAPIEN PrimalForms. Using PrimalForms is a very powerful and easy way to create GUI for your Windows PowerShell scripts. You can export the code required to script a GUI to a Windows PowerShell script and then customize it to make it more useful. Behind the scenes, we use the namespace to generate a GUI. There are many GUI controls supported by this namespace. In today’s post, we will see an example that shows how to use the DataGrid control to display the information in a tabular form.įirst, we design a GUI form using SAPIEN’s PrimalForms Community Edition. #SAPIEN POWERSHELL STUDIO USING INPUT B OXES HOW TO# We place a DataGrid control and three buttons, each with some custom text representing the action.


When loaded, this form will list the running processes and let us stop a selected process or refresh the process information displayed in the grid.Īfter the design is complete, we export the form to a Windows PowerShell script using the “Export PowerShell” option. This generates the necessary code to create the GUI form in Windows PowerShell. Now, we need to edit this script to add the custom code we need to create our process manager. We need to perform the following script changes to make our process manager functional.ġ. #SAPIEN POWERSHELL STUDIO USING INPUT B OXES HOW TO#.
