Set-ExecutionPolicy - Powershell 1.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.
Description Change the execution policy (user preference) Usage Options -executionPolicy Policy A new execution policy for the shell. Valid values: Restricted Do not load configuration files or run scripts. This is the default. AllSigned Require that all scripts and configuration files be signed by a trusted publisher, including scripts that you write on the loca l computer. RemoteSigned Require that all scripts and configuration files downloaded from the Internet be signed by a trusted publisher. Unrestricted Load all configuration files and run all scripts. If you run an unsigned script that was downloaded from the internet, you are prompted for permission before it runs. -whatIf Describe what would happen if you executed the command without actually executing the command. -confirm Prompt for confirmation before executing the command. CommonParameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutVariable. Example(s) Set the user preference for the shell execution policy to RemoteSigned and then display the effective execution policy. The commands are separated by a semicolon (;) PS C:\>set-executionpolicy remotesigned; get-executionPolicy Get information about the Authenticode signature for two files: PS C:\>get-AuthenticodeSignature C:\NewScript.ps1 E:\OtherScript.ps1