0

I'm trying to code in flutter and got an error message saying it cant be loaded because of a ps1 file not being digitally signed. I googled that error and saw it could be an execution policy error, I changed it to unrestricted and I get a message saying "

Set-ExecutionPolicy : Windows PowerShell updated your execution policy successfully, but the setting is overridden by a policy defined at a more specific scope. Due to the override, your shell will retain its current effective execution policy of Restricted.

"

Any idea how I can fix it?

enter image description here

  • Does this answer your question? [How do you successfully change execution policy and enable execution of PowerShell scripts](https://stackoverflow.com/questions/27753917/how-do-you-successfully-change-execution-policy-and-enable-execution-of-powershe) – Ocaso Protal Feb 22 '23 at 15:10
  • No, I tried using that solution however I can't get rid of the "Set-ExecutionPolicy : Windows PowerShell updated your execution policy successfully, but the setting is overridden by a policy defined at a more specific scope. Due to the override, your shell will retain its current effective execution policy of Restricted." message and when trying to run flutter I sitll get the message saying its not digitally signed – Paola Vilaseca Feb 22 '23 at 15:12

1 Answers1

0

It was a hierarchical issue, since the MachinePolicy is set to "AllSigned" it was going to ask for the ps1 files to be digitally signed no matter what. I was able to fix this with the following command

Set-ItemProperty -Path HKLM:\Software\Policies\Microsoft\Windows\PowerShell -Name ExecutionPolicy -Value ByPass