For **Windows 11** go to
system settings -> Privacy & Security -> Choose `For Developers` tile under Security -> Scroll down to Powershell.
[![enter image description here][1]][1]
By default the checkbox is checked. If you want to set that click Apply and it set the execution policy to `Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser`. Then checkbox and Apply button get disabled.
If you want to change the policy again, need to run the Powershell as an Administrator and execute the desired policy.
Sometimes you may not able to change the policy based on the scope and it might get below error.
For an example if you are try to set to the default policy using `Set-ExecutionPolicy -ExecutionPolicy Restricted -Scope LocalMachine` you may get
[![enter image description here][2]][2]
To fix this you may need to follow [fix-windows-powershell-updated-your-execution-policy-successfully, but the setting is overridden by a policy defined at a more specific scope][3]
or check answers in here. [cannot change the Execution Policy][4]
[1]:
[2]:
[3]:
[To see links please register here]
[4]:
[To see links please register here]