返回Get-TfsItemHistory特定值 [英] return Get-TfsItemHistory specific value
本文介绍了返回Get-TfsItemHistory特定值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Powershell尝试创建电子邮件脚本,该脚本将为最新版本发送变更集和受影响的工作项的列表
I am using powershell to try to make a email script that will send out a list of changesets and affected work items for the latest build
我正在用
Get-TfsItemHistory WorkspacePath -Version "LBuild 9.1.71.1~LBuild 9.1.72.1" -Recurse |
Select * -exp WorkItems |
Format-Table Committer,ChangesetId,Comment,Id,Title -GroupBy ChangesetId -Auto
如何获取特定值,例如第四次变更集的Commiter值
How can I get a specific value such as the 4th changeset's Commiter value
推荐答案
您需要通过管道传输到Select-Object cmdlet
You need to pipe to the Select-Object cmdlet
Get-TfsItemHistory WorkspacePath -Version "LBuild 9.1.71.1~LBuild 9.1.72.1" -Recurse | Select * -exp WorkItems | Select-Object -First 1 -Skip 3 | Select-Object -Property Committer
这只能拉出第四项,并且只返回提交者.
This should only pull out the 4th item and only return the Committer.
这篇关于返回Get-TfsItemHistory特定值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文