none
Querying TFS 2015 Source Code Repositories with Powershell and Visual Studio 2019 RRS feed

  • Question

  • I am trying to create a Powershell script with Visual Studio 2019 that accesses a particular Team Foundation Server 2015 team project- as well as several of its repositories/latest release branches- and identifies only those files (e.g. .sql, .cs) that have been either created or modified within the past 3 years.  I am not interested in the work or build tabs on Team Foundation Server, but rather the 'code tab'- and all the files listed in the subordinate explorer tab for a specific repository.  I've tried several classes and modules, including Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer and tfsCmdlets, and none has the necessary functionality.  I also tried to install Microsoft Team Foundation Power Tools 2015, but it does not appear compatible with Visual Studio 2019 (I really do not want to install VS 2015).  Can anyone help?
    Monday, August 19, 2019 9:46 PM

All replies

  • Hi HDOlsen,

    Welcome to the MSDN forum.

    According to your description, please try to follow the steps to connect to the TFS

    ##I also tried to install Microsoft Team Foundation Power Tools 2015, but it does not appear compatible with Visual Studio 2019 

    >>l have found an similar issue which l hope it could help you.

    https://developercommunity.visualstudio.com/content/problem/570847/power-tools-for-azure-devops-server-2019.html

    BTW,  you can also redirect your issue  to the Stack Overflow with the tag powershell and tfs for better support.

    Thanks for your understanding.

    Best Regards,

    Perry


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Tuesday, August 20, 2019 7:31 AM
  • Hi HDOlsen,

    Sorry for bothering you. Did you have any update for this issue?

    According to your description, maybe you could use below powershell command line to get the file information:

    .\tfshistory.ps1 -server http://tfs:8080 -fromDate 11/1/2017 -toDate 11/30/2017 -path Electron/Dev -maxCount 500 -outFile results.csv

    Please refer more: PowerShell Script Provides Simple Change History File

    Best Regards,

    Dylan

    Note: This response contains a reference to a third-party World Wide Web site. Microsoft is providing this information as a convenience to you. 

    Microsoft does not control these sites and has not tested any software or information found on these sites; Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there.

    There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet



    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Tuesday, September 3, 2019 8:10 AM
  • Hi Dylan, Thank you very much. I was able to resolve this with the Invoke-RestMethod and the REST API 2.0. All the best, H
    Wednesday, September 11, 2019 1:37 AM