The term '.\ps2exe.ps1 is not recognized

Sep 10, 2014 at 7:35 PM
Hi, I'm quite new to PowerShell scripts so please forgive my naive questions. I've tried my best to convert my script to an exe with PS2EXE however I keep getting errors involving "The term '.\ps2exe.ps1 is not recognized as the name of a cmdlet, function, sc". I ran the callPS2EXE.bat and the createDemo.bat which worked perfectly but I can't seem to get it to run with my own script. So far I've tried to execute the conversion in PowerShell, PowerShell ISE, and CMD. I figure it is probably a syntax error I'm making somewhere somewhere since I don't have a great understanding of PowerShell yet. If anyone could assist me with this issue I would be extremely appreciative. Thanks!
Sep 12, 2014 at 11:23 AM

It is not easy to say what the problem is! - Normally .\ps2exe.ps1 only works from a PowerShell console (powershell.exe). You cannot start it this way from a Windows Command Line (cmd.exe). - Have you tried this?

Sep 12, 2014 at 6:52 PM
I actually ended up figuring this out later on that day. It turns out I just didn't have my PowerShell Console set to start in the same location as ps2exe.ps1. This source showed me how to change that:

After that was fixed it worked flawlessly! Thanks for the program and your prompt support!