Reputation: 67
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?
Upvotes: 0
Views: 3410
Reputation: 67
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
Upvotes: 1