Powershell 获取所有 TFS 工作区

Powershell to get all TFS Workspaces

我正在尝试获取在我的 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 作为参数传递,那么它应该拉取所有工作区...我什么也得不到...

我是馆藏管理员。

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