PS2EXE : "Convert" PowerShell Scripts to EXE Files

This PowerShell script lets you "convert" PowerShell scripts into EXE files.

4.5 Star
84,125 times
Add to favorites
E-mail Twitter Digg Facebook
Sign in to ask a question

  • Way to add version to exe?
    2 Posts | Last post January 03, 2019
    • Any way to add a file version number under the exe property detail?
    • I see the answer below now :)
      -version on Markus version of the script!
  • Adding Publisher
    2 Posts | Last post June 27, 2018
    • I want to add publisher information to exe that we get as output. Currently it is showing as Unknown Publisher. Any workaround??
    • See answer on question "Produktversion" below.
  • Crash message after closing application
    1 Posts | Last post June 14, 2018
    • Hello
      I have used your script/program to convert my Powershell script into an .EXE. As a Powershell script it worked fine and the .exe version also worked fine but when I close it or it finishes, I get a crash message. Is it something with my script, or have I made a mistake converting it? Honestly I have no clue why this is happening.
      Has anyone also expierienced this or can help?
      Thanks in advance
  • PS2EXE and Excel
    1 Posts | Last post April 18, 2018
    • I wrote a script to manage multiple excel to convert to CSV and convert to custom Excel report.
      From the exe file I received, like the belows, error messages when it try to open the source excel files.
      Also other calls to methods or any other functions to Excel create an error messages, like the variables were null.
      The exe file, like the original script it's executed with the run as Administrator.
      I call the excel in this way:
      $ExcelWB=new-object -comobject excel.application
      What I do wrong?
      ERROR: You cannot call a method on a null-valued expression.
      ERROR: Exception calling "Quit" with "0" argument(s): "Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))"
      ERROR: Exception setting "Visible": "Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))"
  • Two output of verbose in console
    2 Posts | Last post April 13, 2018
    • I wrote a windows application using Powershell code, when I the code in PS it shows single verbose output but after converting to EXE using PS2EXE (latest version) I do see two verbose output. Just for isolation purpose, created a simple PS with following line of code. 
    • Hello Pradeep-Papnai,
      since Ingo Karstein obviously does not work on PS2EXE anymore, I overworked his script so many errors are fixed. Among those errors are the "doubled" VERBOSE and WARNING handlers you suffer of:
  • Produktversion
    2 Posts | Last post October 24, 2017
    • Hy Folks,
      is it possible to set a Produkt or Release Version to the exe File?
      Regardes Mike
    • Hello Mike-zdf,
      since Ingo Karstein does not develop PS2EXE any further, you have to use my version of PS2EXE ( or the one of Stuart Dootson to set version Information to the exe file.
  • Hide Command Window
    3 Posts | Last post October 11, 2017
    • Is it possible to hide the black command window?
    • Hello Mike-zdf,
      try compiling your script with the additional parameter -noConsole
    • Perfect.
  • Get-Credential
    2 Posts | Last post September 24, 2017
    • The script I converted to exe has the Get-Credential option in it. When I run the exe as administrator I get the following text and error
      "cmdlet Get-Credential at command pipeline position 1
      Supply values for the following parameters:
      Exception in ik.PowerShell.PS2EXEHostUI.Prompt*2
      Windows PowerShell credential request
      Enter your credentials.
      User name: admin
      Cannot process argument transformation on parameter 'Credential'. Cannot process argument because the value of argument
      "password" is null. Change the value of argument "password" to a non-null value."
      as you can see it asks me for my user name but never asks for a password.  Is there anyway to fix this?
      Ryan B.
    • Hello RBleinin,
      this is an error in PS2EXE. Since Ingo Karstein obviously does not work on PS2EXE anymore, you can try my overworking that has this error fixed (among others):
  • Version Error
    2 Posts | Last post September 08, 2017
    • We are running powershell version 5.1.  When I try to run your converter, it returns the error "THE POWERSHELL VERSION IS UNKNOWN!".  I redownloaded the above zip, but same issue.  Please advise.
    • Hello dottkp,
      it seems that Ingo Karstein does not improve his script anymore. So you have two choices:
      1. Change line 74 of ps2exe.ps1 from
      if($PSVersionTable.PSVersion.Major -eq 4) {
      if($PSVersionTable.PSVersion.Major -ge 4) {
      2. Use one of the further developments of ps2exe
      The one from Rengifo, from Stuart Dootson or mine (
  • Problem with modules after compilation.
    1 Posts | Last post August 23, 2017
    • Sorry in advance if I haven't found answer to this question - I searched though.
      The issue is that when I run my script as .ps1 - all modules, GUI and functionality behaves as intended, though if I compile it to .exe - modules seems not to be working. All the functionality, except parts where scripts needs to work with PSRemoteRegistry and Quest AD snippet, works.
      Is there something in exe config file I am missing? Or something in compilation script I need to amend/alter?
1 - 10 of 85 Items