Reputation: 1520
I have a power shell script
which runs on when the user is logged on and logged off.
The script have confidential information such as admin user id and password
.
So i want this script to be only executable with no read/write permission.
Is there any way to achieve this.?
Thanks,
Upvotes: 0
Views: 1195
Reputation: 68273
Why embed admin credentials in the script? You can set it up as an event-triggered scheduled task (based on the logon and logoff events), and register it to run under the admin creds. The password will be stored with the task registration and not visible to the user.
Upvotes: 1
Reputation: 2516
You can just convert it to binary, check out this thread: https://social.technet.microsoft.com/Forums/windowsserver/en-US/4b53e1f1-2706-4be1-9355-65d259a45834/convert-powershell-script-to-exe-file?forum=winserverpowershell
Upvotes: 0