Set-ExecutionPolicy RemoteSigned # to set the policy to RemoteSigned.
Set-ExecutionPolicy Unrestricted # to set the policy to Unrestricted.
Get-ExecutionPolicy # to verify the current settings for the execution policy.
Set-ExecutionPolicy -ExecutionPolicy <PolicyName>
#Example:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
#To set the execution policy in a particular scope:
Set-ExecutionPolicy -ExecutionPolicy <PolicyName> -Scope <scope>
#Example:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Set-ExecutionPolicy -ExecutionPolicy <PolicyName> # general syntax
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned # for example