This is a re-post of a thread lost during the forum hardware crash.

PowerShell is a VERY powerful tool but its myriad of 'permissions' can sometimes be confusing.

Here's a script written in AutoHotkey (AHK) that shows a GUI allowing you to make execution permission changes on either a 'per user' or 'all users' (i.e. machine-wide) basis easily.

Note that the AHK script runs in elevated mode, i.e. it pops a User Account Control (UAC) prompt because PowerShell needs elevation to amend its own execution permissions.

powershell-execution-policy-changer.jpg
Click to enlarge

The AHK script is as follows:

Code:
#SingleInstance ; Ensure only one instance at a time
#Persistent ; Ensure the script persists until an ExitApp
#NoTrayIcon ; Ensure no tray icon
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

; Prompt to 'Run as Admin', i.e. show UAC dialog
If Not A_IsAdmin
{
   Run *RunAs "%A_ScriptFullPath%"  ; Requires AutoHotkey v1.0.92.01+
   ExitApp
}

; Set initial states of variables
Clipboard =
SEP = 
Scope = 
Txt = Select an option then check the Execution Policy text that appears here.`n`n Click the Change button to change the policy.`n`nOnly one change can be made at a time!`n`nClick the View button to show the current policies in effect.`n`nPress ESC or click the Exit button or click the X (top right) to close the dialog.

; Define the GUI
Gui, Add, GroupBox, x12 y10 w140 h220 , Current User
Gui, Add, Radio, x32 y30 w100 h30 gCU_Restricted, Restricted
Gui, Add, Radio, x32 y70 w100 h30 gCU_AllSigned, AllSigned
Gui, Add, Radio, x32 y110 w100 h30 gCU_RemoteSigned, RemoteSigned
Gui, Add, Radio, x32 y150 w100 h30 gCU_Unrestricted, Unrestricted
Gui, Add, Radio, x32 y190 w100 h30 gCU_Undefined, Undefined
Gui, Add, GroupBox, x172 y10 w120 h220 , All Users
Gui, Add, Radio, x182 y30 w100 h30 gAU_Restricted, Restricted
Gui, Add, Radio, x182 y70 w100 h30 gAU_AllSigned, AllSigned
Gui, Add, Radio, x182 y110 w100 h30 gAU_RemoteSigned, RemoteSigned
Gui, Add, Radio, x182 y150 w100 h30 gAU_Unrestricted, Unrestricted
Gui, Add, Radio, x182 y190 w100 h30 gAU_Undefined, Undefined
Gui, Add, Button, x30 y240 w100 h30 , Change
Gui, Add, Button, x180 y240 w100 h30 , View
Gui, Add, Button, x330 y240 w100 h30 , Exit
Gui, Add, Text, x302 y10 w160 h220 vTxt, Execution Policy:
Gui, Show, w479 h286, PowerShell Execution Policy Changer
GuiControl,, Txt, %Txt% ; Update the initial text
return

; Set up the code blocks
CU_Restricted:
SEP = Restricted
Scope = CurrentUser
Txt = Execution Policy:`n`nNo PowerShell scripts can be run.`n`nWindows PowerShell can be used only in interactive mode.`n`nThis means that you can only run individual commands.`n`nYou can't run scripts under this policy, regardless of where the scripts came from (local or downloaded) and whether they are signed.
Gui, submit, nohide
GuiControl,, Txt, %Txt%
return

CU_AllSigned:
SEP = AllSigned
Scope = CurrentUser
Txt = Execution Policy:`n`nOnly PowerShell scripts signed by a trusted publisher can be run.`n`nWhen you attempt to run a signed script, you'll receive a prompt asking you to confirm that you trust the publisher.
Gui, submit, nohide
GuiControl,, Txt, %Txt%
return

CU_RemoteSigned:
SEP = RemoteSigned
Scope = CurrentUser
Txt = Execution Policy:`n`nDownloaded PowerShell scripts must be signed by a trusted publisher before they can be run.`n`nScripts that you run from the local computer don't need to be signed.`n`nThere are no prompts when you attempt to run a script.
Gui, submit, nohide
GuiControl,, Txt, %Txt%
return

CU_Unrestricted:
SEP = Unrestricted
Scope = CurrentUser
Txt = Execution Policy:`n`nNo restrictions at all.`n`nAll PowerShell scripts can be run.
Gui, submit, nohide
GuiControl,, Txt, %Txt%
return

CU_Undefined:
SEP = Undefined
Scope = CurrentUser
Txt = Execution Policy:`n`nNo execution policy has been set.`n`nThis is the DEFAULT setting.
Gui, submit, nohide
GuiControl,, Txt, %Txt%
return

AU_Restricted:
SEP = Restricted
Scope = LocalMachine
Txt = Execution Policy:`n`nNo PowerShell scripts can be run.`n`nWindows PowerShell can be used only in interactive mode.`n`nThis means that you can only run individual commands.`n`nYou can't run scripts under this policy, regardless of where the scripts came from (local or downloaded) and whether they are signed.
Gui, submit, nohide
GuiControl,, Txt, %Txt%
return

AU_AllSigned:
SEP = AllSigned
Scope = LocalMachine
Txt = Execution Policy:`n`nOnly PowerShell scripts signed by a trusted publisher can be run.`n`nWhen you attempt to run a signed script, you'll receive a prompt asking you to confirm that you trust the publisher.
Gui, submit, nohide
GuiControl,, Txt, %Txt%
return

AU_RemoteSigned:
SEP = RemoteSigned
Scope = LocalMachine
Txt = Execution Policy:`n`nDownloaded PowerShell scripts must be signed by a trusted publisher before they can be run.`n`nScripts that you run from the local computer don't need to be signed.`n`nThere are no prompts when you attempt to run a script.
Gui, submit, nohide
GuiControl,, Txt, %Txt%
return

AU_Unrestricted:
SEP = Unrestricted
Scope = LocalMachine
Txt = Execution Policy:`n`nNo restrictions at all.`n`nAll PowerShell scripts can be run.
Gui, submit, nohide
GuiControl,, Txt, %Txt%
return

AU_Undefined:
SEP = Undefined
Scope = LocalMachine
Txt = Execution Policy:`n`nNo execution policy has been set.`n`nThis is the DEFAULT setting.
Gui, submit, nohide
GuiControl,, Txt, %Txt%
return

ButtonChange:
psScript =
(
    Set-ExecutionPolicy %SEP% -Scope %Scope% -Force
)
RunWait PowerShell.exe -Command %psScript%,, hide ; Call the command but hide the output
Gui, submit, nohide ; Pass the AHK script parameters to the commandline
;msgbox %psScript% ; Used for testing to make sure the commandline string is passed correctly
SplashImage, , b fs18, DONE!
Sleep, 800
SplashImage, Off
return

ButtonView:
psScript =
(
    Get-ExecutionPolicy -List | clip
)
RunWait PowerShell.exe -Command %psScript%,, hide ; Call the command but hide the output
Gui, submit, nohide ; Pass the AHK script parameters to the commandline
GuiControl,, Txt, %Clipboard%
SplashImage, , b fs18, DONE!
Sleep, 800
SplashImage, Off
return

ButtonExit: ; Exit the app if the 'Exit' button is clicked
ExitApp
return

GuiClose: ; Exit the app if the GUI is clicked
ExitApp
It all looks very complicated but it isn't. However, to make it easier I've attached a ZIP file with the AHK code both uncompiled and compiled: PowerShell Execution Policy Changer.zip

Hope this helps...