Azure Pipeline Part 4 – Script Bash pwsh PowerShell

Azure Pipeline Part 4 – Script Bash pwsh PowerShell

Azure Pipeline Part 4 – Script Bash pwsh PowerShell

Hello Everyone

Welcome to CloudAffaire and this is Debjeet.

Today we are going to discuss script, bash, pwsh, and PowerShell in Azure Pipelines. Script, bash, pwsh or PowerShell block allows you to execute a command or script inside a step in Azure Pipelines.

Azure Pipeline Part 4 – Script Bash pwsh PowerShell

Prerequisites:

Setup:

Azure Pipeline – Script:

Using script block inside a step, you can execute a command or script in cmd.exe on Windows or Bash on Linux or Mac.

Azure Pipeline – Script syntax:

Azure Pipeline – Script examples:

Azure Pipeline – Bash:

Using bash block inside a step, you can execute a command or script in Bash shell on Windows, Linux or Mac.

Azure Pipeline – Bash syntax:

Azure Pipeline – Bash example:

Azure Pipeline – pwsh:

Using pwsh block inside a step, you can execute a command or script in PowerShell Core on Windows, Linux or Mac.

Azure Pipeline – pwsh syntax:

Azure Pipeline – pwsh example:

Azure Pipeline – PowerShell:

Using PowerShell block inside a step, you can execute a command or script in Windows PowerShell.

Azure Pipeline – PowerShell syntax:

Azure Pipeline – PowerShell example:

Clean up:

Hope you have enjoyed this article. To know more about Azure DevOps, please refer below official documentation

https://docs.microsoft.com/en-us/azure/devops/?view=azure-devops

Leave a Reply

Close Menu