Skip to main content

Posts

Showing posts with the label PowerShell

Execution Policy in Powershell

How to get and set the Execution Policy Execution Policy in Powershell Execution Policy in Powershell helps to determine the type of scripts that can run on a particular system.  There are different types of Execution Policy in Powershell : 1. RESTRICTED It is the default execution policy in Powershell. It means it doesn't allow any Powershell script(*.ps1) to execute by default. In order to provide security, Microsoft suggests Restricted policy by default so that none of malicious code can be executed by double clicking or running it.  2. ALL SIGNED  All the Scripts should have a digital signature from a trusted publisher, then only you will be able to execute the Script else Script will not be executed. This is applicable for the local scripts also which you write of your own, you will need to assign a certificate to it example Self Signed Certificate . 3. REMOTE SIGNED Local script files doesn't need any signature( they can be executed) but script