Reputation: 135
I have a PS Script that I want to share it with some people. I only want people to be able to execute it, not viewing or modifying it. How would I do that?
Also assuming the people I share the script with know little about PowerShell and how to change execution policy to make it run what would be the best way to do it? I was thinking of making a bat file and set execution policy to unsigned because remotesigned doesn't execute files from the internet right? Would unsigned cause any problem for security since I only execute a single script?
Lastly, I will be storing some password with convertto/from securestring Would it matter to setup securestring if my file can not be modified in question 1? What happens in the case if I forget my password while using securestring method?
Upvotes: 0
Views: 797
Reputation: 816
You could download and install PowerGui, and then compile your .ps1 file to be a .exe however they would still be able to pull the contents of the file when they run it as it exports a copy to %temp%, but they would not be able to 'easily' modify the file. I say 'easily' because basically anything with computers can be performed with the will, time, and smarts to know what you're doing, and I don't know how secure this password or anything else needs to be.
Upvotes: 1