Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I search using powershell on premise TFS ? #38

Open
rifaterdemsahin opened this issue Apr 23, 2018 · 1 comment
Open

How do I search using powershell on premise TFS ? #38

rifaterdemsahin opened this issue Apr 23, 2018 · 1 comment

Comments

@rifaterdemsahin
Copy link

rifaterdemsahin commented Apr 23, 2018

I am running TFS 2017 on prem update 2

$tfsUrl = 'https://tfs:444/tfs'
$projectId = 'd18ff858-xxxxxxxx'
$teamId = '9907188a-xxxxxxxx'
$tfsRepos = "$tfsUrl/Common/$projectId/_apis/search/codesearchresults?api-version=4.1-preview.1"
$secureCredential = Get-Credential
$allResults = (Invoke-RestMethod -Uri $tfsRepos -Method Post -Credential $secureCredential).value
$allResults= $allResults | Select -first 20

I am getting this error

Invoke-RestMethod :
Page not found. - Microsoft Team Foundation Server

Reference ( Could not find TFS Api reference only for the VSTS one is there )
https://docs.microsoft.com/en-us/rest/api/vsts/search/code%20search%20results/fetch%20code%20search%20results

@rifaterdemsahin rifaterdemsahin changed the title How do I search using powershell ? How do I search using powershell on premise TFS ? Apr 23, 2018
@soodputter
Copy link

Hi, i have same problem. Did you find any solution?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants