Powershell : Execution Policy

Question:

I have been running my code for past few months by doing this –

But, something weird is happening and I am getting this error always –

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 “Unrestricted”. Type “Get-ExecutionPolicy -List”
to view your execution policy settings. For more information, please
see “Get-Help Set-ExecutionPolicy.”

I have referred these links but no luck –

Get-ExecutionPolicy -List

Answer:

You should see output like this from Get-ExecutionPolicy -List:

Once you see the scope that has the undesired setting, you can reset it like so:

That is assuming you have permission to do so.

Source:

Powershell : Execution Policy by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply