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 on Azure. The task can be installed from the Marketplace.
How to use the task
First add the task to you build or release pipeline. Select the +Add tasks -> Utility -> Run Inline PowerShell:
More tips and tricks
Use VSTS variables
Let your task fail
VSTS 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
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 build variables as arguments to your script. Some variables are accessible from Powershell, however secrets can only be passed as an argument of your script.
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.