This repository contains scripts helping to administer Azure DevOps Services and Azure DevOps Server. These are either PowerShell or T-SQL scripts using varying technologies to make changes or to extract data. Use at your own risk.
See the Contributor guidelines to contribute to this code.
Generally I put variables at the top, that need to be configured prior to running the script. One you might run into is the following:
$pat = Get-Content -Path ".\pat.txt"
You'll need a pat.txt file in the working folder, containing just one Azure DevOps Personal Access Token and nothing else. It will be used for authentication.
In most cases, the following standard can be used:
- HTTP GET/POST/PUT/DELETE > ContentType = application/json
- HTTP PATCH > ContentType = application/json-patch+json
But there are some exceptions, e.g.:
- Create Work Item: POST, ContentType = application/json-patch+json
- Teamfieldvalues - Update: PATCH, ContentType = application/json
- Comments - Update: PATCH, ContentType = application/json
See: https://developercommunity.visualstudio.com/t/REST-API-ContentType-unclear-from-docume/10355958 I used the Feedback button, but Microsoft never got back to me on this.