ExecutionPolicy Enumeration
Defines the execution policies that the Windows PowerShell runtime can use to run commands.
Namespace: Microsoft.PowerShell
Assembly: System.Management.Automation (in System.Management.Automation.dll)
Namespace: Microsoft.PowerShell
Assembly: System.Management.Automation (in System.Management.Automation.dll)
| Member name | Description |
|---|---|
| AllSigned | Requires that all scripts and configuration files be signed by a trusted publisher, including scripts that you write on the local computer. |
| Bypass | Loads all configuration files and runs all scripts. If you run an unsigned script that was downloaded from the Internet, you are not prompted for permission before it runs. This field is introduced in Windows PowerShell 2.0. |
| Default | Specifies the default policy (Restricted) used by Windows PowerShell. |
| RemoteSigned | Requires that all scripts and configuration files downloaded from the Internet be signed by a trusted publisher. |
| Restricted | Does not load configuration files or run scripts (default). |
| Undefined | No execution policy is defined. This field is introduced in Windows PowerShell 2.0. |
| Unrestricted | Loads all configuration files and runs all scripts. If you run an unsigned script that was downloaded from the Internet, you are prompted for permission before it runs. |
Windows PowerShell execution policies provide security by determining the conditions under which it loads configuration files and runs scripts. The default execution policy is Restricted, which allows individual commands to be run, however scripts cannot be run.
Target Platforms
Windows 98, Windows 2000 , Windows 2000 Server , Windows CE, Windows Server 2008, Windows 98 Second Edition, Pocket PC, Smart Phone, Windows Server 2003, Windows XP Professional, Windows Vista, Windows Server 2003 R2, Windows XP, Windows 7, Windows 2008 R2, Windows Developer Preview, Windows Server Developer PreviewSend comments about this topic to Microsoft.
