Set-ExecutionPolicy

Description

Changes the user preference for the PowerShell execution policy.

Command
Set-ExecutionPolicy
Examples
Set the execution policy to RemoteSigned for the current user
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Get the current execution policy
Get-ExecutionPolicy -List
Parameters
Parameter Type Required Description
[-ExecutionPolicy] <ExecutionPolicy> string No Specifies the new execution policy. Options: Unrestricted, RemoteSigned, AllSigned, Restricted, Default, Bypass, Undefined.
[-Scope <ExecutionPolicyScope>] string No Specifies the scope that is affected by an execution policy. Options: Process, CurrentUser, LocalMachine.
Command Info
Category: Security
Type: Powershell
Views: 12
Status: Active
Tags
powershell security scripting policy