powershell scripts disabled code example

Example 1: cannot be loaded because running scripts is disabled on this system

Set-ExecutionPolicy -ExecutionPolicy Unrestricted

Example 2: Scripts cannot be executed on this system.

powershell Set-ExecutionPolicy RemoteSigned

Example 3: powershell allow execution

Select Start > All Programs > Windows PowerShell version > Windows PowerShell.
Type Set-ExecutionPolicy RemoteSigned to set the policy to RemoteSigned.
Type Set-ExecutionPolicy Unrestricted to set the policy to Unrestricted.
Type Get-ExecutionPolicy to verify the current settings for the execution policy.