PowerShell を使用して TFS2010 プロジェクトに貢献者を追加するにはどうすればよいですか?
1 に答える
1
PowerShell のドキュメント (C:\Program Files (x86)\Microsoft Team Foundation Server 2010 Power Tools\Help\PowerShellCmdlets.mht) を見ると、TFS のグループにユーザーを追加するオプションがないようです。ただし、TFS Power Tools がインストールされている場合は、コマンド ラインで tfssecurity ツールを使用できます。
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>tfssecurity /?
[...]
/g+ groupIdentity memberIdentity (/collection:CollectionURI | /server:ServerURI)
Adds a user or a group to an existing group.
[...]
Identity Specifiers:
sid:sid - References the identity with the specified SID.
Example: sid:S-1-5-21-2127521184-1604012920-1887927527-588340
n:[domain\]name - References the identity with the specified name. For Windows, name is the logon name. If the referenced identity is in a domain, the domain name is required. For application groups, name is the group display name and domain is the URI or GUID of the containing project. In this context, if domain is omitted, the scope is assumed to be collection-level.
Example: To reference the identity of the user "John Peoples" in the domain "Datum1" at the fictitious company "A. Datum Corporation, you would use the following syntax:
n:DATUM1\jpeoples
Example: To reference application groups, you could use either of the following syntaxes:
n:"Full-time Employees"
n:00a10d23-7d45-4439-981b-d3b3e0b0b1ee\Vendors
[...]
したがって、次のようになります。
tfssecurity /g+ [ProjectName]\Contributor Domain\UserName /collection:http://yourTfs:8080/ProjectCollection
于 2012-12-03T12:41:01.157 に答える