How to access “Custom” or non-System TFS workitem fields using PowerShell?

风格不统一 提交于 2019-12-05 22:27:46

There is a Fields collection property in each work item that appears to contain all the work item fields and values. Access it like so:

Get-TfsItemHistory . -r -vers "D12/14/2010~" | 
    Where {$_.WorkItems.count -gt 0} | Select -Expand workitems | 
    Select @{n='WIT-Id';e={$_.Id}},Title -Expand Fields | 
    Where {$_.ReferenceName -eq 'Microsoft.VSTS.Common.ActivatedBy'} | 
    Format-Table Value,WIT-Id,Title -auto
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!