Asked by:
How to encrypt a PS script

Question
-
Hello,
Can I somehow encrypt a script but still be able to run it while its encrypted so that no one can see my code but still can use my script?Wednesday, January 9, 2019 5:54 PM
All replies
-
You can package it with a number of third party packagers. This is not the correct forum for asking this question since there is not PowerShell way to encrypt a script and make it work.
Search for script packagers. There are many.
\_(ツ)_/
Wednesday, January 9, 2019 6:20 PM -
Hi,
Thanks for your question.
This link might help you.
Or
PShellExechttp://infospectruminc.com/uploads/HowToPShell.html
Best Regards,
Just do it.
- Edited by LeeSeenLiMicrosoft contingent staff Thursday, January 10, 2019 7:47 AM
- Proposed as answer by LeeSeenLiMicrosoft contingent staff Tuesday, January 22, 2019 7:39 AM
Thursday, January 10, 2019 7:46 AM -
You can try converting it into executable using ps2exe
https://gallery.technet.microsoft.com/scriptcenter/PS2EXE-Convert-PowerShell-9e4e07f1
Friday, January 11, 2019 1:52 AM -
Hi,
Was your issue resolved?
If you resolved it using our solution, please "mark it as answer" to help other community members find the helpful reply quickly.
If you resolve it using your own solution, please share your experience and solution here. It will be very beneficial for other community members who have similar questions.
If no, please reply and tell us the current situation in order to provide further help.
Best Regards,
Lee
Just do it.
Tuesday, January 22, 2019 7:39 AM -
You can package it but before that make sure you sign the script with a certificate.
VJ
Tuesday, January 22, 2019 7:46 AM