# Powershell Security

Sometimes PowerShell prevents you from running build.ps1. Here are some common scenarios and what to do about it.

# Assumed security settings

Run the following command to view your PowerShell security settings:

PS> Get-ExecutionPolicy -List


The docs assume you have the following settings:

        Scope ExecutionPolicy
----- ---------------
MachinePolicy       Undefined
UserPolicy       Undefined
Process       Undefined
CurrentUser       Undefined
LocalMachine    RemoteSigned


Effectively this is "RemoteSigned". Depending on how you start PowerShell, you could have different settings. You can read how to change your settings here http://go.microsoft.com/fwlink/?LinkID=135170. Assuming the MachinePolicy and UserPolicy settings are Undefined, you can running this relatively safe command to get RemoteSigned security:

PS> Set-ExecutionPolicy RemoteSigned -Scope Process


If you downloaded build.ps1 and you have the above settings, you still might get the following error:

.\build.ps1 : File C:\Users\CakeUser\Documents\my_cake_proj\build.ps1 cannot be loaded. The file
C:\Users\CakeUser\Documents\my_cake_proj\build.ps1 is not digitally signed. You cannot run this script

PS> Unblock-File path\to\build.ps1