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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Pipe to connect to Powershell

Has anyone been able to connect to powershell via bitbucket pipelines? I have some simple SharePoint code that I house in my bitbucket repo and would like to start deploying those updates via pipelines.

I'm unable to find any documentation on this and was wondering if anyone else has had any experience doing this.  

Not much here, but this is what I have so far...

memory: 2048
- step: &connect-to-powershell
name: Connect to Powershell
- CMD [ "Connect-SPOService", "-Url", $psURL ]

- step: *connect-to-powershell

 ...and this is the error message I recieve.

+ CMD [ "Connect-SPOService", "-Url", $psURL ]
bash: CMD: command not found

 Any help or guidance here would be greatly apprecaited.


Thank you!

1 answer

@John Issa you can see 'bash' in error log.

It means by default pipeline supports bash commands.

But you can try execute in a script  powershell commands you need via pwsh tool.

For example:

name: powershell
- pwsh -Command {Get-Module -Name Microsoft.Online.SharePoint.PowerShell -ListAvailable}


Also, looks like powershell does not have sharepoint installed. You can do something for this.

If you don't succeed with that, you can try going with Custom pipe. Look how you can create your custom pipe here . Because I see, that executing this just in pipeline seems quite complex.

Regards, Galyna

Suggest an answer

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

Announcing the waitlist for Jira Work Management

Hey there Cloud Community members! We’re excited to give you the first glimpse of the new home for business teams on Jira — Jira Work Management. Jira Work Management is the next generation of J...

754 views 12 19
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