Skip to content
| Marketplace
Sign in
Azure DevOps>Azure Pipelines>Run Inline Powershell and Azure Powershell

Run Inline Powershell and Azure Powershell

Peter Groenewegen

|
12,323 installs
| (31) | Free
Build extension that enable you to run Powershell and Azure Powershell from a textbox.

InlinePowershell

The Inline PowerShell VSTS task enables you to execute PowerShell from a textbox within your build or release pipeline. You can run a PowerShell script on you agent or as Azure Powershell.

Documentation

Configure the task

Add the task to you build or release pipeline. Select the +Add tasks -> Utility -> Run Inline PowerShell:

alt tag

Next you can enter the PowerShell script into the textbox:

alt tag

Run your build or release to see the ‘Hello world’ in the logs.

Adding arguments

Next you will be able to add argument to pass custom build variables. You need to pass them as arguments if they are marked as secret.

alt tag

This will give you the following output:

alt tag

Variables marked a secret will be shown as ********. This to prevent them to be reviled to everybody with access to the logs.

See my blog

Sources

Tips and Tricks

Use VSTS variables

Let your task fail

Set progress

Change buildnumber

VSTS Powershell command overview

Call a WebHook

Download a file

Install a Powershell Module

Navigate VSTS as filesystem

Make VSTS API Rest calls

Script example: Act on failed build

  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft