Contact Info

Crumbtrail » Administration » Powershell » Powershell 2.0 » Set-ExecutionPolicy

Set-ExecutionPolicy - Powershell 2.0 CmdLet

Microsoft Windows PowerShell is a command-line shell and scripting tool based on the Microsoft .NET Framework. It is designed for system administrators, engineers and developers to control and automate the administration of Windows and applications.

More than hundred command-line tools (so called "cmdlets") can be used to perform system administration tasks and Windows Management Instrumentation (WMI). These cmdlets are easy to use, with standard naming conventions and common parameters, and standard tools for piping, sorting, filtering, and formatting data and objects.


Short description
Changes the user preference for the Windows PowerShell execution policy.

Set-ExecutionPolicy [-ExecutionPolicy] {Unrestricted | RemoteSigned | AllSigned | Restricted | Default | Bypass | U
ndefined} [[-Scope] {Process | CurrentUser | LocalMachine | UserPolicy | MachinePolicy}] [-Force] [-Confirm] [-What
If] [<CommonParameters>]

The Set-ExecutionPolicy changes the user preference for the Windows PowerShell execution policy. 

To run this command on Windows Vista, Windows Server 2008, and later versions of Windows, you must start Windows Po
werShell with the "Run as administrator" option, even if you are a member of the Administrators group on the comput

The execution policy is part of the security strategy of Windows PowerShell. It determines whether you can load con
figuration files (including your Windows PowerShell profile) and run scripts, and it determines which scripts, if a
ny, must be digitally signed before they will run.

For more information, see about_Execution_Policies.