共用方式為


/gc 命令

更新:2007 年 11 月

使用 /gc 建立專案特定的群組。

必要的使用權限

您必須是 [Team Foundation Administrators] 安全性群組的成員,才能使用 /gc 命令。如需詳細資訊,請參閱 Team Foundation Server 使用權限

注意事項:

即使您已使用管理認證登入,還是必須開啟較高權限的命令提示字元,在執行 Windows Server 2008 的伺服器上執行此函式。若要開啟較高權限的命令提示字元,請按一下 [開始],以滑鼠右鍵按一下 [命令提示字元],再按一下 [以系統管理員身分執行]。如需詳細資訊,請參閱 Microsoft 網站 (英文)。

TFSSecurity /gc scope groupName [groupDescription] /server:servername

參數

引數

描述

scope

指定 Team 專案的專案 GUID 或 URI。若要檢視 URI,請將 https://localhost:8080/services/v1.0/CommonStructureService.asmx 複製到瀏覽器,按一下 Team Foundation Server 上的 [ListAllProjects],然後按一下 [叫用]。

groupName

指定專案群組名稱。

groupDescription

選擇項,指定專案群組說明。

/server:servername

必要項。指定應用程式層電腦的名稱。

備註

在本機應用程式層電腦上,執行此命令。

具有專案範圍的群組是 Team 專案的安全性群組。專案群組可以用來授與讀取、寫入和管理使用權限,以滿足您組織的安全性需求。

範例

以下範例將建立 URI 所指定專案專屬的群組:"vstfs://Classification/TeamProject/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"。群組的名稱為 "Test Group",描述則為 "This group is for testing"。

您必須將替代符號 GUID 取代為要為其建立這個群組之 Team 專案的 URI。若要檢視 Team 專案的 URI,請將 https://localhost:8080/services/v1.0/CommonStructureService.asmx 複製到 Team Foundation Server 應用程式層上的瀏覽器,然後按一下 [叫用]。Team 專案 URI 會以 <Uri></Uri> 標籤包圍的方式顯示。

執行命令之後,您可以在 Team 總管中驗證群組。以滑鼠右鍵按一下您在命令中使用的 Team 專案,按一下 [Team 專案設定],然後按一下 [群組成員資格]。[<team project name> 上的專案群組] 對話方塊的 [群組] 清單中包含 Test Group。

>TFSSecurity /gc "vstfs:///Classification/TeamProject/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" "Test Group" "This group is for testing" /server:MyServer

請參閱

工作

HOW TO:建立伺服器層級群組

HOW TO:建立 Team 專案群組

其他資源

TFSSecurity 命令列公用程式命令

Team 專案群組

預設群組