- Use the Set-ExecutionPolicy cmdlet, and we suggest using the RemoteSigned policy setting. You’re welcome to use AllSigned, but it’ll be impractical for the purposes of this book’s remaining labs. You could also choose -Unrestricted.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
Get-ExecutionPolicy -list
output:
Scope ExecutionPolicy
----- ---------------
MachinePolicy Undefined
UserPolicy Undefined
Process Undefined
CurrentUser Undefined
LocalMachine RemoteSigned