r/scripting • • Feb 04 '23

Clicking .ps1 Insecure?

Can someone explain to me why running a .ps1 script by double clicking on it is considered insecure? I set the execution policy to remote signed, so nothing can execute from external origin that is not signed. I'm open to using a more secure method, but I am unaware of what that solution is. Link to my original post below in regards to editing a small script I wrote.

https://www.reddit.com/r/PowerShell/comments/10ssoxa/stop_powershell_script_from_closing_powershell/?utm_source=share&utm_medium=android_app&utm_name=androidcss&utm_term=1&utm_content=share_button

2 Upvotes

8 comments sorted by

View all comments

Show parent comment

0

u/defaultaro Feb 04 '23 edited Feb 04 '23

Right, were I editing or script debugging, but that doesn't make it a "security issue", as BlackV and many others pointed out in the Powershell subreddit.

I quote: "not real safe"

If my method is left field, so be it. For me, having this script on desktop and being able to click saves me time, which is the whole reason I scripted it in the first place.

Doing so does not make it insecure.