TFS 2015 REST API Authentication

The OAuth mechanism is used against the VSO api at the time of writing this as you’ve seemingly identified. official docs for VSO OAuth tokens here. For on-prem however, the following is required: Via a javascript client (note I’m using jquery for the ajax request here) Since alternative creds or token based auth isn’t available … Read more

How to fail the build from a PowerShell task in TFS 2015

I’ve created a very simple script: Write-Error (“Some error”) exit 1 Save this as a PowerShell script. Create a new Empty Build definition and only add one PowerShell task that points to your script. When I do this I get a failed build with the following error: 2015-12-30T10:27:29.4872452Z . ‘C:\a\1\s\script.ps1’ 2015-12-30T10:27:29.6780242Z Executing the following powershell … Read more