【问题标题】:Powershell to get all TFS WorkspacesPowershell 获取所有 TFS 工作区
【发布时间】:2016-02-25 15:42:03
【问题描述】:

我正在尝试获取在我的 TFS 服务器上创建的所有工作区的列表。我试过了:

 #if no collection specified, open project picker to select it via gui
$picker = New-Object Microsoft.TeamFoundation.Client.TeamProjectPicker([Microsoft.TeamFoundation.Client.TeamProjectPickerMode]::NoProject, $false)
$dialogResult = $picker.ShowDialog()
if ($dialogResult -ne "OK")
{
    exit
}
$tfs = $picker.SelectedTeamProjectCollection
$tfs.EnsureAuthenticated()
$vcs = $tfs.GetService([Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer]);

$wss = $vcs.QueryWorkspaces($null, $null, $null);

documentation 暗示如果我将所有 NULL 作为参数传递,那么它应该拉取所有工作区...我什么也得不到...

我是收藏管理员。

【问题讨论】:

    标签: powershell tfs tfs-2015


    【解决方案1】:

    尝试使用[System.Management.Automation.Language.NullString]::Value 而不是$null 作为第一个参数。

    【讨论】:

      猜你喜欢
      • 2018-05-24
      • 2019-03-10
      • 1970-01-01
      • 2014-10-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-08-04
      • 1970-01-01
      相关资源
      最近更新 更多