Author Posts

December 22, 2015 at 2:32 pm

What is the best free tool to "wrap" PowerShell script in exe? I have used PowerGUI, but for some reason, I receive an error message when exiting the script. It works fine, but I receive an error when using .NET 3.5 or .NET 4.0. It works fine with PowerShell Studio, but I receive the prompt saying it's a trial and I don't want to spend the money on the full version at this point. I have tried to use a PowerShell script called PS2EXE, but that does not work correctly as well. Any suggestions?

December 22, 2015 at 5:06 pm

You could use visual studio's community edition and call the powershell script from a custom application.

http://blogs.msdn.com/b/kebab/archive/2014/04/28/executing-powershell-scripts-from-c.aspx

Probably not as easy as you want it to be though.

December 22, 2015 at 5:29 pm

Yeah, that is pretty interesting, but I don't know anything about C#. Don't quite understand most of what is written in that blog post you sent. I will look further into it at some point in case it would be useful to use a C# application.

December 23, 2015 at 8:19 am

PowerGUI hasn't been updated in a long time, and that might be one reason it's wonky for you. It's no longer a supported product as far as I know.

This is one of those things where doing the task is complex enough that it might be worth paying for a tool that does it right ;). I mean, ever try to frame a house using a rock? Makes a hammer look pretty inexpensive.