Powershell: Prevent Users To View and Change Input or Config Files That Are Used by a Script

Often, I use .xml or .ini files to store settings that a PowerShell script uses. When I distribute my scripts to end users, sometimes, I want to make sure users cannot manually view or change the content of these config files. Below is what I did to achieve the goal: Create a password protected zip file that contains the config file (.xml or .ini). rename the zip file from xxxxxx.zip to xxxxxx.bin In powershell script, use ICSharpCode.SharpZipLib.dll to unzip renamed zip file compile powershell script to exe so users cannot view the script to figure out the zip file password.

Continue reading
%d bloggers like this: