How to enforce Secure Windows PowerShell

New Contributor
Hello everyone,
I'm trying to enforce Secure Windows PowerShell by setting the execution policies to be locally or remotely signed and disable execution policy bypass?
Is the below cmd line meet the above requirement:-

The cmd line :-
set-ExecutionPolicy RemoteSigned
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Set-ExecutionPolicy -ExecutionPolicy AllSigned -Scope Process
please advise
Best Regards,
2 Replies


Have you admin access to your laptop if:

Yes :

  • Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
  • Set-ExecutionPolicy -ExecutionPolicy RemoteSigned

No :

  • Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
  • Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser


NB: The default policy is Restricted, and if you want to force the setting of execution policies, please use GPO, to configure, navigate under Computer Configuration to Policies\Administrative Templates\Windows Components\Windows PowerShell. You should see a setting called Turn on Script Execution.

To Secure PowerShell
Click Start Menu > Control Panel > System and Security > Administrative Tools.
Create or Edit Group Policy Objects > Windows PowerShell > Turn on Script Execution.