A little while ago I casually used the snippet Set-ExecutionPolicy -Scope Process -ExecutionPolicy Unrestricted
when beginning some PowerShell code.
I've seen many articles or instructions recommend that people simply set the execution policy to unrestricted for the whole local machine. This is messy for two reasons.
If all you want is to run some local scripts you're working with, setting this to your current process is enough. You don't require elevation, and only that particular shell instance is affected, minimizing risk.
Stay safe!
Tags: powershell