powershell script execution disabled code example
Example 1: powershell enable scripts
Set-ExecutionPolicy unrestricted
Example 2: PSSecurityException
set-executionpolicy remotesigned
Example 3: PowerShell says “execution of scripts is disabled on this system.”
Set-ExecutionPolicy RemoteSigned
Example 4: PowerShell says “execution of scripts is disabled on this system.”
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser