Monday, 4 May 2015

PowerShell from SourceTree as a custom action

Step 1:
Create a ps.bat file with one line:

start powershell

Save this file in an appropriate location. I saved mine to:

Step 2:
Add a custom action to SourceTree.

You do this by going to

Tools -> Options -> Custom Actions

Click the 'Add' button and you will get another Window.

On the 'Menu caption' type an identifier for PowerShell and on 'Script to run' navigate to the script you made in step 1 then click 'OK' and exit from the 'Options' Window.

Step 3:
Test PowerShell.

1 comment:

  1. start powershell -Command "start powershell"

    This command works better: source tree would not hang waiting for you to close the shell