title: Get TFS Query Results Using Powershell
body: <p>I am relatively new to both Powershell and REST API calls. I am trying to get the results of a query in TFS so that I can iterate through the results and compare some data from another application. What I can't figure out is how to get the actual results - I can get the query details just fine, but not the actual results.</p>
  <pre><code>$TFS_uri = &quot;http://mytfsserver.com:8080/tfs/Company/IT Main/_apis/wit/queries/My Queries/RTB Tactical - Backlog/?api-version=2.0&quot;
  
  #call TFS API
  $TFS_responseData = Invoke-RestMethod -Uri $TFS_uri -Method get -ContentType 'application/json' -UseDefaultCredentials
  $TFS_responseData
  </code></pre>
  <p>The output gives me the query id (dbfd5177-17af-4265-98c8-bfe19a94b9e3), but I have no idea how to actual execute the query and get the results.</p>