Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Error after running powershell script

I've just started to learn Bomboo. I'm trying to run job with very simply  power shell script:

$a = findstr "def"
if ($a) {return 1} else {return 0}

I got errors:

/u03/atlassian/bamboo-home/temp/ line 1: =: command not found
/u03/atlassian/bamboo-home/temp/ line 2: syntax error near unexpected token `{return'
/u03/atlassian/bamboo-home/temp/ line 2: `if ($a) {return 1} else {return 0}'

 What am I doing wrong?

1 answer

2 votes
Charlie Misonne Community Leader Dec 09, 2021

Hi Nikita,

Did you select powershell as interpreter in the script task configuration?

And is your Windows agent running on Windows? 

Tnank you for answer.

There was problem with agent. It was running on Linux.

Like Steffen Opel _Utoolity_ likes this

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bamboo

Bamboo Data Center 8.1 is now available

G’day Bamboo customers, Bamboo DC 8.1 is now available with it the following features and programs: SAML 2.0, OpenID Connect, and Crowd SSO In order to help admins with a simplified user manage...

217 views 0 4
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you