Forum Discussion

Abu_Faisal's avatar
Abu_Faisal
Copper Contributor
May 08, 2020

How to enforce Secure Windows PowerShell

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,
AboFaisal

2 Replies

  • Lewis-H's avatar
    Lewis-H
    Iron Contributor
    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.
  • mfessalifi's avatar
    mfessalifi
    Copper Contributor

    Abu_Faisal 

    Have you admin access to your laptop if:

    Yes :

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

    No :

    • Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
      or
    • 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.

Resources