This topic has not yet been rated - Rate this topic

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)
'Usage
Dim instance As ExecutionPolicy

public enum ExecutionPolicy
public enum ExecutionPolicy
public enum ExecutionPolicy
Member nameDescription
AllSignedRequires that all scripts and configuration files be signed by a trusted publisher, including scripts that you write on the local computer.
BypassLoads 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.
DefaultSpecifies the default policy (Restricted) used by Windows PowerShell.
RemoteSignedRequires that all scripts and configuration files downloaded from the Internet be signed by a trusted publisher.
RestrictedDoes not load configuration files or run scripts (default).
UndefinedNo execution policy is defined. This field is introduced in Windows PowerShell 2.0.
UnrestrictedLoads 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 Preview

Send comments about this topic to Microsoft.
© 2013 Microsoft. All rights reserved.