question

MrFlinstone-1451 avatar image
1 Vote"
MrFlinstone-1451 asked ThomasBoomer-3882 commented

Convert Powershell to Exe

I am trying to convert a Ps script to an exe, does anyone know of a utility that can do this. The research I have done point to old scripts that are no longer available.

windows-server-powershell
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Invoke-PS2EXE .\myscript.ps1 .\myscript.exe

0 Votes 0 ·

1 Answer

IanXue-MSFT avatar image
2 Votes"
IanXue-MSFT answered JohnDoe-3333 published

Hi @MrFlinstone-1451 ,

The ps2exe module could be helpful

https://www.powershellgallery.com/packages/ps2exe

Best Regards,
Ian Xue
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Is there away to add icon with that tool?

0 Votes 0 ·

You can find the complete documentation at this link: https://github.com/MScholtes/PS2EXE
There is also an option to add an icon file.

Hope this is helpful,
G


0 Votes 0 ·

I hate to be the one to provide this update...

https://github.com/MScholtes/PS2EXE#attention-incorrect-virus-detection

Attention: Incorrect virus detection
Some (really) stupid idiots seem to have abused PS2EXE to compile their computer virus scripts. As a result, a rapidly growing number of virus scanners recognize programs created with PS2EXE as malicious programs and delete them.

There is only one hope to save the PS2EXE project: Please send your (harmless) programs created with PS2EXE via the web forms from the virus scanners' vendors for reporting false positives (I've already done it with some of them, please use only the false positive page)!

If this is not successful, then I will have to quit PS2EXE as nobody can use it anymore.

Thank you for your support


0 Votes 0 ·