Powershell获取所有TFS工作区
问题描述:
我正在尝试获取在我的TFS服务器上创建的所有工作区的列表。我曾尝试:Powershell获取所有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意味着,如果我通过所有空的作为参数,那么它应该把所有的工作区。我得不到任何回报......
我是一个集合管理员。
答
尝试使用[System.Management.Automation.Language.NullString]::Value
而不是$null
作为第一个参数。