convert ps to exe feature image

Convert PowerShell Script to exe in Windows 10

PowerShell is a Scripting Language Mostly associated with the Windows Operating system’s administration task. PowerShell is used to automate repetitive tasks through scripting to increase efficiency and productivity. The PowerShell script is just a collection of cmdlets saved into a text file using .ps1 extensions, you can run this script by clicking on it. PowerShell understands this script file and executes the commands in sequence order to perform different actions. Some of the basic uses of Windows PowerShell scripts are installing and uninstalling Windows Applications, Finding the IP address, printing the list of running resources, and counting the list of files and folders. You can also create a script to do some advanced windows repetitive tasks. On Windows 10 you can create a PowerShell script using any text editor or by using the ISE console. PowerShell offers Integrated Scripting Environment (ISE) to create Script, test, and debug. PowerShell script ends with .ps1 extension, you can use this script file to automate any windows tasks. In this article, we are going to see how to convert PowerShell script ps file to exe.

Convert PowerShell Script to exe:

Note: Before proceeding with this method, make sure the script file executing correctly. And the check the Script execution policy is set to Unrestricted.

First Download the PS2EXE zip file from the GitHub page.

Click on Code Drop down menu and choose Download Zip file.

Once you downloaded the zip file extract it and copy the PS2EXE-master folder to the C drive.

Now Open PowerShell in elevated mode and type the following command and hit enter.

PS C:\> cd .\PS2EXE-master\
PS C:\PS2EXE-master> Install-Module ps2exe

Install-Module ps2exe command will install the module, you will get the confirmation message to continue the installation. Type Y and hit enter.

Confirmation message

Next you will get Untrusted repository confirmation message, type Y and hit enter to proceed the installation.

untrusted PowerShell Script to exe

That’s it the Module is successfully installed. Now you can convert the ps file to exe.

Type Win-ps2exe command to open the GUI.

Once you launch the GUI, first choose the Source file of the PowerShell script, next under the Icon file choose the icon in ico format. Choose Platform as AnyCPU. Finally, click on Compile.

PowerShell Script to exe

Once you hit compile you will get the confirmation message.

successful message

That’s it you have successfully converted the PS file to exe format.

Leave a Comment

Your email address will not be published. Required fields are marked *

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

Scroll to Top