【问题标题】:using Get-TfsItemHistory in powershell to get specific property values在 powershell 中使用 Get-TfsItemHistory 来获取特定的属性值
【发布时间】:2016-05-22 08:32:26
【问题描述】:

我正在使用 powershell 尝试制作一个电子邮件脚本,该脚本将发送最新版本的变更集和受影响的工作项列表

我正在这样做

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 值

我想找到一种方法可以将其放入循环中进行搜索

N 个变更集的 Committer、ChangesetId、Comment、Id 和 Title 值

【问题讨论】:

    标签: powershell tfs tfs-workitem


    【解决方案1】:

    与本案重复:return Get-TfsItemHistory specific value

    如果你想选择这个变更集,也建议你使用Select-Object

    既然你提到你想要获得 N 个变更集的 Committer、ChangesetId、Comment、Id 和 Title 值。我想知道您是否要进行自定义以显示此信息。您可以使用$_.committer。请查看此博客了解更多详细步骤:http://edwinfrey.com/blog/2012/06/02/tfs-history-reporting-with-powershell/

    【讨论】:

      猜你喜欢
      • 2016-05-22
      • 2018-10-17
      • 2013-05-08
      • 1970-01-01
      • 2012-04-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-12-16
      相关资源
      最近更新 更多