allow script execution powershell code example
Example 1: powershell enable scripts
Set-ExecutionPolicy unrestricted
Example 2: cannot be loaded because running scripts is disabled on this system.
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted
Example 3: PSSecurityException
set-executionpolicy remotesigned
Example 4: cannot be loaded because running scripts is disabled on this system
Set-ExecutionPolicy RemoteSigned