July 5

Powershell: Set the script running security level

Using the Set-ExecutionPolicy Cmdlet
Changing the Windows PowerShell Script Execution Policy

 

The Set-ExecutionPolicy cmdlet enables you to determine which Windows PowerShell scripts (if any) will be allowed to run on your computer. Windows PowerShell has four different execution policies:

Restricted – No scripts can be run. Windows PowerShell can be used only in interactive mode.

AllSigned – Only scripts signed by a trusted publisher can be run.

RemoteSigned – Downloaded scripts must be signed by a trusted publisher before they can be run.

Unrestricted – No restrictions; all Windows PowerShell scripts can be run.

 

To assign a particular policy simply call Set-ExecutionPolicy followed by the appropriate policy name. For example, this command sets the execution policy to RemoteSigned:

Set-ExecutionPolicy RemoteSigned

By: Microsoft


Copyright 2021. All rights reserved.

Posted July 5, 2017 by Timothy Conrad in category "Programming

About the Author

If I were to describe myself with one word it would be, creative. I am interested in almost everything which keeps me rather busy. Here you will find some of my technical musings. Securely email me using - PGP: 4CB8 91EB 0C0A A530 3BE9 6D76 B076 96F1 6135 0A1B