Raph’s Blog

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:
C:\CustomCommands

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.