PowershellRM
PowershellRM copied to clipboard
`ScriptFile`s can't be executed because of `LocalMachine` Execution Policy
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
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope LocalMachine
CurrentUser might also play a role into this, but in all my tests I left it as Unrestricted.
Posting all of this here because I couldn't find it anywhere else online.