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.
Configure the task
Add the task to you build or release pipeline. Select the +Add tasks -> Utility -> Run Inline PowerShell:
Next you can enter the PowerShell script into the textbox:
Run your build or release to see the ‘Hello world’ in the logs.
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.
This will give you the following output:
Variables marked a secret will be shown as ********. This to prevent them to be reviled to everybody with access to the logs.
Tips and Tricks