How to convert powershell script to exe in Windows 11/10 Easily

Scripts make our lives way easier. Instead of writing, compiling, and running the same sets of commands regularly, it is way easier to create a script on your own and run it just by double-clicking on it once. But, there are some restrictions already in place that may block the script you have written. So, it is better to convert your powershell script to an executable file. They are better than the scripts in almost every aspect of features and it is very easy to do so.

 

Featured Image Min

 

Convert a PowerShell script to executable

To convert a powershell script you will need the PS2EXE-GUI on your system.

1. Download PS2Exe-GUI on your computer.



2. Once you have downloaded the zip file, extract the zip file in a location of your choice.

 

Extract Ps2 Min

 

3. After extracting the files, go to the location where you have extracted the files.

4. Then, you have to double click on the “Win-PS2EXE“.

 

Win Mse Dc Min

 

5. Once Win-PS2EXE opens up, click “” beside the ‘Source file‘ to select the script file.

 

Source File Selectiomn Min

 

6. Select the Powershell script (.ps1) you want to convert to a .exe file on your device.

7. Click on “Open“.

 

Select File Min

 

8. Then, click on the “” beside the ‘Icon file:‘ and navigate to find the icon file.

 

Icon Selection Min

 

9. Select the icon file and click on “Open” to select the icon file.

 

Select Icon File Min

 

10. Coming back to the Win-PS2EXE screen, write a name in the ‘Target file:‘ box.

(For example – We have named the file as ‘Targetfilescript’.)

11.  Finally, click on “Compile“.

 

Target And Compile Min

 

The compilation process will start and executed on the PowerShell screen.



12. Once it is compiled you will see, “Press Enter to leave:” message has appeared. Press the “Enter” key to finish the process.

 

Press Enter To Leave Min

 

You can find your executable file in the same location where you have the script on your computer.

 

Featured Image Min

 

That’s it! You have successfully created an executable file for your script. Just double click on the new executable and it will do the same thing as the script. The automation tools are better than scripts and these tend to have fewer restrictions over them and there are fewer chances of tampering by other 3-rd party users.