Convert PowerShell script into non-readable format


I have a PowerShell script which installs a patch (contains set of files to be added) on a customer machine. For this, I have created a batch file which executes this PowerShell script.
For the customer to run this batch file, the PowerShell script file must be placed onto the customer machine as well.

The PowerShell script is in text format, which can be read and understood by the customer easily.

Can we convert this script file into some non-readable format (e.g. bin or exe), so that it is not readable by the customer?


You can convert the script to Base64 encoding, so that it’s not immediately readable. To convert a PowerShell script file to a Base64 String, run the following command:

To launch the Base64-encoded script, you can call PowerShell.exe as follows:

For example, the following command:

Will return the following results:


Convert PowerShell script into non-readable format by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply