Just as the title says, while LineN options work because they use the Default execution policy, running a script file errors out. You can see the Scopes and Execution Policies by running Get-ExecutionPolicy -List. The simple fix to this problem is opening PowerShell as admin and typing
Just as the title says, while
LineN
options work because they use theDefault
execution policy, running a script file errors out. You can see the Scopes and Execution Policies by runningGet-ExecutionPolicy -List
. The simple fix to this problem is opening PowerShell as admin and typingCurrentUser
might also play a role into this, but in all my tests I left it asUnrestricted
.Posting all of this here because I couldn't find it anywhere else online.