Powershell获取所有TFS工作区

MrH*_*ood 0 powershell tfs tfs-2015

我试图获取在我的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);
Run Code Online (Sandbox Code Playgroud)

文件意味着,如果我通过所有空的作为参数,那么它应该把所有的工作区.我得不到任何回报?

我是收藏管理员.

ds1*_*s19 5

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