Calling PowerShell from SourceTree custom action

Is it possible to call a PowerShell script from a custom action in SourceTree?

I've tried adding it directly as the "Script to run", as well as using "powershell" as the script to run and then adding the actual script as one of the parameters.

Same result in both cases - the script is not called, and the SourceTree progress dialog when running the custom action never finishes. I have to press the Cancel button to stop the execution.

I've also tried wrapping the PowerShell script inside of a Batch file, but the same happens again - it never finishes. Running the batch file from command line works perfectly fine.

Is there a working example for running a PowerShell script from a SourceTree custom action?

2 answers

This widget could not be displayed.

Can you view details when running the custom action? If so, is there anything there?

You might try experimenting with running a random powershell script that requires no parameters. It may be that the parameters you're using need escaped or quoted differently.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted 5 hours ago in Teamwork

What teamwork quotes inspire you?

Hey everyone! My name is Natalie and I'm an editor of the Atlassian Blog and I've got a question for you: What's your favorite quote about teamwork?  We've compiled a list here, along with...

15 views 0 4
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you