Convert PowerShell script to executable file

Hello,
I used the Win-PS2EXE tool to convert the script to an .exe file, but when I run the executable file, I see the following errors:

ERROR: Could not retrieve information about the Security log. Error: Attempted to perform an unauthorized operation..
ERROR: There is not an event log on the localhost computer that matches "Security".

The script works correctly, but its executable file does not work!

Thank you.

Since PS2EXE has limitations or conditions it’s still possible that the error is caused by something you have in your script. :point_up: :wink: :man_shrugging:

Are you running ‘as admin’? The security event log requires elevated rigths

2 Likes

Hello,
I used Invoke-ps2exe and the problem was fixed.

Thank you.