r/PowerShell • • Dec 31 '19

Helpdesk/Remote Support Powershell Script - Expedite frequent & repetitive helpdesk tasks

https://github.com/Justin-Lund/PS-Remote-Support
122 Upvotes

31 comments sorted by

View all comments

32

u/admiralspark Jan 01 '20

Please don't set execution policy to unrestricted.

0

u/[deleted] Jan 01 '20

[deleted]

-4

u/uptimefordays Jan 01 '20

You can also Unblock-File which allows a file to run without changing Execution Policy.

1

u/Kaeny Jan 01 '20

Would i put that in the target field in the shortcut, or is that some attribute of the ps1 file?

9

u/mOjO_mOjO Jan 01 '20

Ignore. That's not correct info. Unblock-file will release the warning prompt you get from any downloaded file (not just PS). You know that prompt you get if you just downloaded an exe and run it saying it's from the internet and may not be safe (I totally forget the actual prompt) but there's a checkbox to never prompt again. That's what this command pertains to. You can also unblock the file by doing a properties on the freshly downloaded file and checking a box. This command just does that from PS. It has nothing to do with execution policy. That being said to run the downloaded script you'll probably need to unlock it first but if your execution policy doesn't permit running the script then you'll still have to mess with execution policy settings. In other words, these two things are independent of each other and serve different purposes.

1

u/Kaeny Jan 01 '20

Oh well aint that spooky.

Thanks for clearing things up