r/PowerShell • u/MartianMoon • Dec 31 '19
Helpdesk/Remote Support Powershell Script - Expedite frequent & repetitive helpdesk tasks
https://github.com/Justin-Lund/PS-Remote-Support
122
Upvotes
r/PowerShell • u/MartianMoon • Dec 31 '19
5
u/admiralspark Jan 01 '20
Does the shortcut run set-executionpolicy bypass? It sort of depends on the context and session, it might be good or it might set it for your session or even worse, all sessions.
What I would do instead is look into setting up code signing. I just run a single command and it signs my script and embeds the signature, and since I used our internal CA to do it my code is trusted on all of our machines. The only catch is that you have to remember to re-sign it if you change any of the code but that's easily solved by having your ci/cd do the signing and only allow code to run that made it successfully through ci/cd.
If you're not that far along your journey, I'd look at code signing by hand or use PSSessions and set it to bypass only within that session.