Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,741
Community Members
 
Community Events
184
Community Groups

How can I execute a PowerShell Script from the Script task in a Bamboo job?

Edited

I need to execute a PowerShell script in Bamboo. Below are the steps I did:

  • Add task in a Job - 'Script' Task
  • Selected the Interpreter as 'PowerShell'
  • Tried Script locations as both inline and File (using Inline, tried to run Write-Host command). Using File, I tried executing a .sh script (which build successfully in the same bamboo agent when run directly using PowerShell in admin mode in that machine)

Note : the build agent is a windows machine

The task failing with error - 

Failing task since return code of [powershell -NonInteractive -ExecutionPolicy bypass -Command d:\bambooagent\temp\MER-BPMUI-JOB1-33-ScriptBuildTask-7361736628996142855.ps1] was -1 while expected 0

The PowerShell Execution policy of the build agent machine is 


Scope                      ExecutionPolicy
-----                         ---------------
MachinePolicy         Restricted
UserPolicy                Restricted
Process                    Undefined
CurrentUser             Unrestricted
LocalMachine          Unrestricted

 

I am blocked in this step. Looking for urgent assistance on this. What needs to be done? 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events