You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
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...
definitions:
services:
docker:
memory: 2048
steps:
- step: &connect-to-powershell
name: Connect to Powershell
image: mcr.microsoft.com/powershell
script:
- CMD [ "Connect-SPOService", "-Url", $psURL ]
pipelines:
branches:
master:
- 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!
@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:
step:
name: powershell
image: mcr.microsoft.com/powershell
script:
- 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
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...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.