public/build/Add-PSTSBuildDefinitionTemplate.ps1

#https://dev.azure.com/tgits-code/88a1ccc1-8e26-4c7c-a8af-31eb27ecec57/_apis/build/definitions/templates/<name>
function Add-PSTSBuildDefinitionTemplate {
   [CmdletBinding()]
   param(
      [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)][string] $project,
      [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)][string] $name,
      [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)][string] $inFile
   )

    process {


        $content = `
            _PSTSAPI `
                -project $project `
                -resource "build/Definitions/templates/$name" `
                -method "PUT" `
                -inFile $inFile `
                -contentType "application/json" `
                -apiVersion "api-version=5.1-preview.3"


        return [Object]$content
   }
}