There is a backstory for this which will be saved for a later post, but this is too good to not share.
So, say for example you have a script which isn’t signed (Ahem!) and you’re wanting to run it from a UNC path (Network Share)
If you try and do this, it’ll throw up a security error.
But to bypass this, you simply have to call it from a batch file something similar to this
This will then bypass any issues you have, and it’s for a one time use so you don’t have to change the ExecutionPolicy within Powershell.
Hope this helps some guys out there trying to run certain scripts on Logon (Or scheduled tasks!)