1

I had changed my execution policy in Windows powershell but would like to change it back to default i.e unrestricted to restricted. Can it be done?

hello there
  • 19
  • 1
  • 2

1 Answers1

3

Just like how you ran...

Set-ExecutionPolicy Unrestricted

...to set it to unrestricted, you would simply run this to set it back to restricted:

Set-ExecutionPolicy Restricted
n8te
  • 7,480
  • 16
  • 30
  • 40
  • Alternatively, you can use `Set-ExecutionPolicy Default` to ["\[set\] the default execution policy. Restricted for Windows clients or RemoteSigned for Windows servers."](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-executionpolicy?view=powershell-6#parameters) – Worthwelle Aug 26 '19 at 16:28
  • funnily enough, `set-executionpolicy unrestricted` did not work but `Set-ExecutionPolicy Default` did. – sommmen Dec 03 '20 at 15:44