Rajesh Ramamurthy (MSFT) 已针对该问题提供了一个修复程序(在 Brian Harry 的博客上发表评论),该问题也应在即将发布的 TFS 2017 Update 1 版本中修复。
这是如何完成的:
- 在 TFS 配置数据库中运行以下 SQL:
select
LocalScopeId from tbl_Groupscope where PartitionId > 0 and
ScopeType = 2 and Active = 1
- 结果应复制到服务器上的文件中,例如 C:\LocalScopeIdList.txt
- 在服务器上运行以下 power shell 脚本并根据需要更新前三个值。
第 3 步的脚本:
$url = "http://localhost:8080/tfs/defaultcollection"
$localScopeIdList = Get-Content C:\LocalScopeIdList.txt
$cmd = "C:\Program Files\Microsoft Team Foundation Server 15.0\Tools\TFSSecurity.exe"
$collection = "/collection:"+ $url
$permissions = "Read", "Write", "Delete", "ManageMembership", "CreateScope"
foreach($scopeId in $localScopeIdList) {
foreach($permission in $permissions) {
$token = $scopeId + "\"
$param = @("/a+", "Identity", $token, $permission, "adm:", "ALLOW", $collection)
Write-Host $param
& $cmd $param
}
}
我已经在我们的预生产服务器上成功地尝试了上述方法,因此我希望本周末将其部署到生产环境中。