PowerShell tips – part 016.

The tutorial for today is about the PowerShell G.U.I. (GUI is defined as an acronym for graphical user interface).
You can solve this issue with an editor tool like POSHGUI, or use any text editor.
I will show you one commented script about how to create a form with a text and two buttons.
In this PowerShell script, you will see changes for each G.U.I. elements.
First, let’s see my version of PowerShell using the command prompt:

If you want to run scripts open the command prompt with Run as administrator privilege and start the PowerShell and run this commands.

The system will prompt to confirm the change.
Enter the letter Y or press the enter key to change the execution policy setting.
After you run the script you can change it back with this command:

You have at this moment two PowerShell windows.
In the first one create your script with notepad and give the name GUI_001.ps1.

Add these source code to the file and run it with .\GUI_001.ps1:

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.