Terminal and shell

Fix "running scripts is disabled on this system"

PowerShell blocks scripts by default. Allow your own and signed scripts for your user only.

Fill these in once

This is a Windows PowerShell message. On macOS, see Run a script you downloaded.

This is a Windows PowerShell message. On Linux, see Run a script you downloaded.

  1. See the current settings
    PowerShell
    Get-ExecutionPolicy -List
  2. Allow your own and signed scripts
    PowerShell
    Set-ExecutionPolicy -Scope CurrentUser RemoteSigned

    Type Y if asked. This only affects your user, not the whole PC.

  3. Unblock a script you downloaded
    PowerShell
    Unblock-File .\setup.ps1

Check it worked

  1. Check the new setting
    PowerShell
    Get-ExecutionPolicy -Scope CurrentUser

    You should see RemoteSigned.

Undo it
  1. Go back to the default
    PowerShell
    Set-ExecutionPolicy -Scope CurrentUser Undefined