How to use TFS PowerShell to get list of changesets and associated work items?

一笑奈何 提交于 2019-12-02 18:47:27

Yes, you're on the right track. Try this as a way to view workitems associated with a changeset:

Get-TfsItemHistory "$/Project/Branch" -Version "D01/12/10~" -Recurse | 
    Select ChangesetId -exp WorkItems | 
    Format-Table Id,Title -GroupBy ChangesetId -Auto
PreguntonCojoneroCabrón

Using Microsoft.TeamFoundation.Client view https://stackoverflow.com/a/30047077/4051367

Usage

$versionControlServer.QueryHistory

$vCSChangeSets = $versionControlServer.QueryHistory($locationToSearch, $latest, 0, $recursionType, $userName, $versionFrom, $versionTo, [int32]::MaxValue, $true ,$false, $false, $true) 
$TargetChangeSetChangeItems = @()  


$TargetChangeSetChangeItems = foreach ($vCSChangeSet in $vCSChangeSets) 
{   
    foreach ($vCSChange in $vCSChangeSet.Changes) 
    { 
        $vCSItem =  $vCSChange.Item 

        # MORE CODE HERE, OMMITTED
    }
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!