Compiling a PowerShell project into an EXE - Transcript

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 5 years and 9 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
anton.burgess@bits.london
Posts: 2
Last visit: Thu Nov 02, 2023 3:53 am

Compiling a PowerShell project into an EXE - Transcript

Post by anton.burgess@bits.london »

Product, version and build: PowerShell Studio 2018 5.5.152
32 or 64 bit version of product: 64-bit
Operating system: Windows 10 Enterprise x64 1703
32 or 64 bit OS: 64-bit

If a project is compiled into an exe, then executed on a system with PowerShell Transcription enabled (via GPO located in Computer Configuration\ Administrative Templates\Windows Components\Windows PowerShell), as the exe is decompiled into a Filename.Run.ps1 file prior to execution, the entire contents of the underlying PowerShell script appear to be visible in plain text within the transcript file.

Is there any way to prevent this from happening aside from rewriting in .NET?

Thanks,
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Compiling a PowerShell project into an EXE - Transcript

Post by davidc »

The Script Packager has some options to disable logging while the script runs:
Packager - Disable Logging.png
Packager - Disable Logging.png (37.27 KiB) Viewed 1769 times
These options require the exe to have the necessary privileges in order to work.
David
SAPIEN Technologies, Inc.
User avatar
anton.burgess@bits.london
Posts: 2
Last visit: Thu Nov 02, 2023 3:53 am

Re: Compiling a PowerShell project into an EXE - Transcript

Post by anton.burgess@bits.london »

Perfect, exactly what I was looking for.

Thanks very much for the support.
This topic is 5 years and 9 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.