使用 TFSSecurity 來管理 Azure DevOps 的群組和許可權

Azure DevOps Server 2022 |Azure DevOps Server 2020 |Azure DevOps Server 2019

您可以使用 TFSSecurity 命令行工具來建立、修改和刪除 Azure DevOps Server 中的群組和使用者,並另外修改群組和用戶的許可權。 如需如何在使用者介面中執行這些工作的資訊,請參閱 將使用者或群組新增至專案

重要

TFSSecurity 命令行工具已被取代,可與 Azure DevOps Services 搭配使用。 雖然 TFSSecurity 可能適用於某些 Azure DevOps Services 案例,但不受支援。 若要變更安全組和 Azure DevOps Services 許可權的建議方法是使用 Web 入口網站az devops securityaz devops permission 命令行工具,或安全性 REST API

命令行工具位置

Azure DevOps 命令行工具會安裝在 Azure DevOps 應用層伺服器的 /Tools 目錄中。

  • Azure DevOps Server 2020:%programfiles%\Azure DevOps Server 2020\Tools
  • Azure DevOps Server 2019:%programfiles%\Azure DevOps Server 2019\Tools
  • TFS 2018: %programfiles%\Microsoft Team Foundation Server 2018\Tools
  • TFS 2017: %programfiles%\Microsoft Team Foundation Server 15.0\Tools
  • TFS 2015: %programfiles%\Microsoft Team Foundation Server 14.0\Tools
  • TFS 2013: %programfiles%\Microsoft Team Foundation Server 12.0\Tools
  • TFS 2012: %programfiles%\Microsoft Team Foundation Server 11.0\Tools
  • TFS 2010: %programfiles%\Microsoft Team Foundation Server 2010\Tools

注意

即使您是使用系統管理認證登入,還是必須開啟提升權限的命令提示字元來執行此功能。

權限

/a+:新增許可權

使用 /a+ 在伺服器層級、集合層級或專案層級群組中新增使用者或群組的許可權。 若要從入口網站將使用者新增至群組,請參閱 在專案或集合層級設定許可權

tfssecurity /a+ Namespace Token Action Identity (ALLOW | DENY)[/collection:CollectionURL] [/server:ServerURL]

必要條件

若要使用 /a+ 命令,您必須分別使用 /collection/server 參數,將 View 集合層級資訊或檢視實例層級資訊許可權設定為 [允許]。 如果您要變更項目的許可權,您也必須擁有項目設定為 [允許] 的 [編輯專案層級資訊] 許可權。 如需詳細資訊,請參閱 許可權和群組參考

參數

引數 描述
命名空間 命名空間,其中包含您要加入使用者或群組權限的群組。 您也可以使用 tfssecurity /a 命令來檢視伺服器、集合和專案層級的命名空間清單。
身分識別 使用者或群組的識別。 如需身分識別規範的詳細資訊,請參閱本文稍後的 身分識別規範
  • 允許
    群組或使用者可以執行 Action 所指定的作業。
  • DENY
    群組或用戶無法執行 Action 所指定的作業。
/collection :CollectionURL 如果未使用 /server ,則為必要專案。 以下列格式指定專案集合的 URL: http:// ServerName Port / VirtualDirectoryName / CollectionName
/server :ServerURL 如果未使用 /collection ,則為必要專案。 以下列格式指定應用層伺服器的 URL: http:// ServerName Port / VirtualDirectoryName

備註

在適用於 Azure DevOps 的應用程式層伺服器上執行此命令。

存取控制項目是一些安全性機制,可判斷使用者、群組、服務或電腦獲得授權執行的作業。

範例:顯示可用的命名空間

下列範例會顯示名為 ADatumCorporation 之應用層伺服器層級可用的命名空間。

注意

範例僅供解說之用,皆為虛構。 亦沒有任何預定或推斷的實際關聯。

tfssecurity /a /server:ServerURL 

範例輸出:

    TFSSecurity - Team Foundation Server Security Tool
    Copyright (c) Microsoft Corporation.  All rights reserved.

    The target Team Foundation Server is http://ADatumCorporation:8080/.

    The following security namespaces are available to have permissions set on them:

         Registry
         Identity
         Job
         Server
         CollectionManagement
         Warehouse
         Catalog
         EventSubscription
         Lab

    Done.

範例:顯示可用的動作

下列範例會顯示集合層級的伺服器層級命名空間可用的動作。

tfssecurity /a Server /collection:CollectionURL 

範例輸出:

    TFSSecurity - Team Foundation Server Security Tool
    Copyright (c) Microsoft Corporation.  All rights reserved.

    The target Team Foundation Server is http://ADatumCorporation:8080/.

    The following actions are available in the security namespace Server:
        GenericRead
        GenericWrite
        Impersonate
        TriggerEvent

    Done.

範例:指派實例層級許可權

下列範例會將 Datum1 網域使用者的 ADatumCorporation 部署許可權授與伺服器層級的 View 實例層級資訊 許可權,該使用者 John 一 (Datum1\jpeoples) 。

tfssecurity /a+ Server FrameworkGlobalSecurity GenericRead n:Datum1\jpeoples ALLOW /server:http://ADatumCorporation:8080 

範例輸出:

    TFSSecurity - Team Foundation Server Security Tool
    Copyright (c) Microsoft Corporation.  All rights reserved.

    The target Team Foundation Server is http://ADatumCorporation:8080/.
    Resolving identity "n:Datum1\jpeoples"...
      [U] Datum1\jpeoples (John Peoples)
    Adding the access control entry...
    Verifying...

    Effective ACL on object "FrameworkGlobalSecurity":
      [+] GenericRead                        [INSTANCE]\Team Foundation Valid Users
      [+] GenericRead                        [INSTANCE]\SharePoint Web Application Services
      [+] Impersonate                        [INSTANCE]\SharePoint Web Application Services
      [+] GenericRead                        [INSTANCE]\Team Foundation Service Accounts
      [+] GenericWrite                       [INSTANCE]\Team Foundation Service Accounts
      [+] Impersonate                        [INSTANCE]\Team Foundation Service Accounts
      [+] TriggerEvent                       [INSTANCE]\Team Foundation Service Accounts
      [+] GenericRead                        [INSTANCE]\Team Foundation Administrators
      [+] GenericWrite                       [INSTANCE]\Team Foundation Administrators
      [+] TriggerEvent                       [INSTANCE]\Team Foundation Administrators
      [+] GenericRead                        DATUM1\jpeoples

    Done.

範例:指派集合層級許可權

下列範例會將集合層級的 View 集合層級資訊許可權授與 Datum1 網域使用者 John Directory (Datum1\jpeoples) 的 Collection0 專案集合。

tfssecurity /a+ Server FrameworkGlobalSecurity GenericRead n:Datum1\jpeoples ALLOW /collection:http://ADatumCorporation:8080/Collection0

範例輸出:

    TFSSecurity - Team Foundation Server Security Tool
    Copyright (c) Microsoft Corporation.  All rights reserved.
    The target Team Foundation Server is http://ADatumCorporation:8080/COLLECTION0.
    Resolving identity "n:Datum1\jpeoples"...
      [U] DATUM1\jpeoples (John Peoples)
    Adding the access control entry...
    Verifying...

    Effective ACL on object "FrameworkGlobalSecurity":
      [+] GenericRead                        [Collection0]\Project Collection ValidUsers
      [+] GenericRead                        [Collection0]\Project Collection Service Accounts
      [+] GenericWrite                       [Collection0]\Project Collection Service Accounts
      [+] Impersonate                        [Collection0]\Project Collection Service Accounts
      [+] TriggerEvent                       [Collection0]\Project Collection Service Accounts
      [+] GenericRead                        [Collection0]\Project Collection Administrators
      [+] GenericWrite                       [Collection0]\Project Collection Administrators
      [+] TriggerEvent                       [Collection0]\Project Collection Administrators
      [+] GenericRead                        [INSTANCE]\SharePoint Web Application Services
      [+] Impersonate                        [INSTANCE]\SharePoint Web Application Services
      [+] GenericRead                        [Collection0]\Project Collection Build Service Accounts
      [+] GenericRead                        DATUM1\jpeoples

    Done.

/a-:從群組的成員資格中移除使用者或群組

使用 /a- 命令,從伺服器層級、集合層級或專案層級群組的成員資格中移除使用者或群組。 若要從入口網站移除群組中的使用者,請參閱 移除用戶帳戶

tfssecurity /a- Namespace Token Action Identity (ALLOW | DENY) [/collection:CollectionURL] [/server:ServerURI]

必要條件

若要使用 /a- 命令,您必須分別使用 /collection/server 參數,將 [檢視集合層級資訊] 或 [檢視實例層級資訊] 權限設定為 [允許]。 如果您要變更項目的許可權,您也必須擁有項目設定為 [允許] 的 [編輯專案層級資訊] 許可權。

參數

引數 描述
命名空間 命名空間,其中包含您要移除使用者或群組許可權的群組。 您也可以使用 tfssecurity /a 命令來檢視伺服器、集合和專案層級的命名空間清單。
身分識別 使用者或群組的識別。 如需身分識別規範的詳細資訊,請參閱本文稍後的 身分識別規範
  • 允許
    群組或使用者可以執行 Action 所指定的作業。
  • DENY
    群組或用戶無法執行 Action 所指定的作業。
/collection :CollectionURL 如果未使用 /server ,則為必要專案。 以下列格式指定專案集合的 URL: http:// ServerName Port / VirtualDirectoryName / CollectionName
/server :ServerURL 如果未使用 /collection ,則為必要專案。 以下列格式指定應用層伺服器的 URL: http:// ServerName Port / VirtualDirectoryName

備註

在適用於 Azure DevOps 的應用程式層伺服器上執行此命令。

存取控制項目是一些安全性機制,可判斷使用者、群組、服務或電腦獲得授權在電腦或伺服器上執行的作業。

範例:顯示伺服器層級命名空間

下列範例會顯示伺服器層級有哪些命名空間可供名為 ADatumCorporation 的應用程式層伺服器使用。

注意

範例僅供解說之用,皆為虛構。 亦沒有任何預定或推斷的實際關聯。

tfssecurity /a /server:ServerURL 

範例輸出:

    TFSSecurity - Team Foundation Server Security Tool
    Copyright (c) Microsoft Corporation.  All rights reserved.

    The target Team Foundation Server is http://ADatumCorporation:8080/.

    The following security namespaces are available to have permissions set on them:

         Registry
         Identity
         Job
         Server
         CollectionManagement
         Warehouse
         Catalog
         EventSubscription
         Lab

    Done.

範例:顯示集合層級的可用動作

下列範例會顯示集合層級的伺服器命名空間可用的動作。

tfssecurity /a Server /collection:CollectionURL 

範例輸出:

    TFSSecurity - Team Foundation Server Security Tool
    Copyright (c) Microsoft Corporation.  All rights reserved.

    The target Team Foundation Server is http://ADatumCorporation:8080/.

    The following actions are available in the security namespace Server:
        GenericRead
        GenericWrite
        Impersonate
        TriggerEvent

    Done.

範例:移除實例層級許可權

下列範例會移除 Datum1 網域使用者的 ADatumCorporation 部署的伺服器 層級檢視實例層級資訊 許可權, (Datum1\jpeoples) 。

tfssecurity /a- Server FrameworkGlobalSecurity GenericRead n:Datum1\jpeoples ALLOW /server:http://ADatumCorporation:8080 

範例輸出:

    TFSSecurity - Team Foundation Server Security Tool
    Copyright (c) Microsoft Corporation.  All rights reserved.

    The target Team Foundation Server is http://ADatumCorporation:8080/.
    Resolving identity "n:Datum1\jpeoples"...
      [U] Datum1\jpeoples (John Peoples)
    Removing the access control entry...
    Verifying...

    Effective ACL on object "FrameworkGlobalSecurity":
      [+] GenericRead                        [INSTANCE]\Team Foundation Valid Users
      [+] GenericRead                        [INSTANCE]\SharePoint Web Application Services
      [+] Impersonate                        [INSTANCE]\SharePoint Web Application Services
      [+] GenericRead                        [INSTANCE]\Team Foundation Service Accounts
      [+] GenericWrite                       [INSTANCE]\Team Foundation Service Accounts
      [+] Impersonate                        [INSTANCE]\Team Foundation Service Accounts
      [+] TriggerEvent                       [INSTANCE]\Team Foundation Service Accounts
      [+] GenericRead                        [INSTANCE]\Team Foundation Administrators
      [+] GenericWrite                       [INSTANCE]\Team Foundation Administrators
      [+] TriggerEvent                       [INSTANCE]\Team Foundation Administrators

    Done.

範例:移除集合層級許可權

下列範例會移除 Datum1 網域使用者的 Collection0 專案集合的集合 層級檢視集合層級資訊 許可權, (Datum1\jpeoples) 。

tfssecurity /a+ Server FrameworkGlobalSecurity GenericRead n:Datum1\jpeoples ALLOW /collection:http://ADatumCorporation:8080/Collection0

範例輸出:

    TFSSecurity - Team Foundation Server Security Tool
    Copyright (c) Microsoft Corporation.  All rights reserved.
    The target Team Foundation Server is http://ADatumCorporation:8080/COLLECTION0.
    Resolving identity "n:Datum1\jpeoples"...
      [U] DATUM1\jpeoples (John Peoples)
    Removing the access control entry...
    Verifying...

    Effective ACL on object "FrameworkGlobalSecurity":
      [+] GenericRead                        [Collection0]\Project Collection ValidUsers
      [+] GenericRead                        [Collection0]\Project Collection Service Accounts
      [+] GenericWrite                       [Collection0]\Project Collection Service Accounts
      [+] Impersonate                        [Collection0]\Project Collection Service Accounts
      [+] TriggerEvent                       [Collection0]\Project Collection Service Accounts
      [+] GenericRead                        [Collection0]\Project Collection Administrators
      [+] GenericWrite                       [Collection0]\Project Collection Administrators
      [+] TriggerEvent                       [Collection0]\Project Collection Administrators
      [+] GenericRead                        [INSTANCE]\SharePoint Web Application Services
      [+] Impersonate                        [INSTANCE]\SharePoint Web Application Services
      [+] GenericRead                        [Collection0]\Project Collection Build Service Accounts

    Done.

/acl:顯示訪問控制清單

使用 /acl 顯示套用至特定物件的訪問控制清單。

tfssecurity /acl Namespace Token [/collection:CollectionURL] [/server:ServerURL]

必要條件

若要使用 /acl 命令,您必須分別使用 /collection 或 /server 參數,將 [檢視集合層級資訊] 或 [檢視實例層級資訊] 許可權設定為 [允許]。 如需詳細資訊,請參閱 Azure DevOps Server 的許可權參考

參數

引數 描述
命名空間 包含您要檢視使用者或群組許可權之群組的命名空間。
/collection :CollectionURL 如果未使用 /server ,則為必要項。 以下列格式指定專案集合的 URL: http:// ServerName Port / VirtualDirectoryName / CollectionName
/server :ServerURL 如果未使用 /collection ,則為必要專案。 以下列格式指定應用層伺服器的 URL: http:// ServerName Port / VirtualDirectoryName

備註

在 Azure DevOps 應用層伺服器上執行此命令。

存取控制項目是一些安全性機制,可判斷使用者、群組、服務或電腦獲得授權在電腦或伺服器上執行的作業。

範例:列出 Sever-level 命名空間的 ACL 指派

下列範例會顯示哪些使用者和群組可以存取 ADatumCorporation 部署內伺服器命名空間中的 FrameworkGlobalSecurity 令牌。

注意

範例僅供解說之用,皆為虛構。 亦沒有任何預定或推斷的實際關聯。

tfssecurity /acl Server FrameworkGlobalSecurity /server:ServerURL 

範例輸出:

	TFSSecurity - Team Foundation Server Security Tool
	Copyright (c) Microsoft Corporation.  All rights reserved.
	The target Team Foundation Server is http://ADatumCorporation:8080/.
	Retrieving the access control list for object "Server"...

	Effective ACL on object "FrameworkGlobalSecurity":
	  [+] GenericRead                        [INSTANCE]\Team Foundation Valid Users
	  [+] GenericRead                        [INSTANCE]\SharePoint Web Application Services
	  [+] Impersonate                        [INSTANCE]\SharePoint Web Application Services
	  [+] GenericRead                        [INSTANCE]\Team Foundation Service Accounts
	  [+] GenericWrite                       [INSTANCE]\Team Foundation Service Accounts
	  [+] Impersonate                        [INSTANCE]\Team Foundation Service Accounts
	  [+] TriggerEvent                       [INSTANCE]\Team Foundation Service Accounts
	  [+] GenericRead                        [INSTANCE]\Team Foundation Administrators
	  [+] GenericWrite                       [INSTANCE]\Team Foundation Administrators
	  [+] TriggerEvent                       [INSTANCE]\Team Foundation Administrators
	  [+] GenericRead                        DATUM1\jpeoples

	Done.

功能區群組

/g:列出群組

使用 /g 列出專案中、專案集合或跨 Azure DevOps Server 的群組。

tfssecurity /g [scope] [/collection:CollectionURL] [/server:ServerURL]

必要條件

若要使用 /g 命令,您必須分別使用 / collection 或 /server 參數,將 [檢視集合層級資訊] 或 [檢視實例層級資訊] 許可權設定為 [允許]。 若要在單一專案的範圍內使用 /g 命令,您必須將 [檢視專案層級資訊 ] 許可權設定為 [允許]。 如需詳細資訊,請參閱 許可權和群組參考

參數

引數 描述
scope 選擇性。 指定您要顯示群組的專案 URI。 若要取得專案的 URI,請開啟 Team Explorer,以滑鼠右鍵按兩下專案,按兩下 [屬性],然後複製URL的整個專案。
/collection :CollectionURL 如果未使用 /server ,則為必要項。 以下列格式指定專案集合的 URL: http:// ServerName Port / VirtualDirectoryName / CollectionName
/server :ServerURL 如果未使用 /collection ,則為必要專案。 以下列格式指定應用層伺服器的 URL: http:// ServerName Port / VirtualDirectoryName

備註

在 Azure DevOps 應用層伺服器上執行此命令。

TFSSecurity 命令行公用程式的 /g 命令會顯示所選範圍內每個群組的相關信息。 此範圍可以是專案集合 (/server) 或應用層伺服器 (/instance) 。 如果與專案範圍搭配使用,它只會顯示與該專案相關聯的群組相關信息。

範例:顯示集合層級群組資訊

下列範例會顯示專案集合內所有群組的資訊。

tfssecurity /g /collection:CollectionURL

/g+:將使用者或其他群組加入現有的群組

使用 /g+ 將使用者或其他群組新增至現有的群組。

tfssecurity /g+ groupIdentity memberIdentity [/collection:CollectionURL] [/server:ServerURL]

必要條件

若要使用 /g+ 命令,您必須分別使用 /collection 或 /server 參數,將 [檢視集合層級資訊] 和 [編輯集合層級資訊] 或 [檢視實例層級資訊] 和 [編輯實例層級資訊] 許可權設定為 [允許]。 如需詳細資訊,請參閱 安全組和許可權參考

參數

引數 描述
groupIdentity 指定群組識別。 如需有效身分識別規範的詳細資訊,請參閱本文稍後的 身分識別規範
memberIdentity 指定成員識別。 如需有效身分識別規範的詳細資訊,請參閱本文稍後的 身分識別規範
/collection :CollectionURL 如果未使用 /server ,則為必要項。 以下列格式指定專案集合的 URL: http:// ServerName Port / VirtualDirectoryName / CollectionName
/server :ServerURL 如果未使用 /collection ,則為必要專案。 以下列格式指定應用層伺服器的 URL: http:// ServerName Port / VirtualDirectoryName

備註

在 Azure DevOps 應用層伺服器上執行此命令。

您也可以使用 Team Explorer 將使用者和群組新增至現有的群組。 如需詳細資訊,請參閱 在專案或集合層級設定許可權

範例:將使用者新增至伺服器層級群組

下列範例會將 Datum1 網域使用者 John Peoples (Datum1\jpeoples) 加入至 Team Foundation Administrators 群組。

注意

範例僅供解說之用,皆為虛構。 亦沒有任何預定或推斷的實際關聯。

tfssecurity /g+ "Team Foundation Administrators" n:Datum1\jpeoples /server:http://ADatumCorporation:8080

範例輸出:

    TFSSecurity - Team Foundation Server Security Tool
    Copyright (c) Microsoft Corporation.  All rights reserved.

    The target Team Foundation Server is http://ADatumCorporation:8080/.
    Resolving identity "Team Foundation Administrators"...
    a [A] [INSTANCE]\Team Foundation Administrators
    Resolving identity "n:Datum1\jpeoples"...
      [U] DATUM1\jpeoples (John Peoples)
    Adding John Peoples to [INSTANCE]\Team Foundation Administrators...
    Verifying...

    SID: S-1-9-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-0-0-0-0-1

    DN:

    Identity type: Team Foundation Server application group
       Group type: AdministrativeApplicationGroup
    Project scope: Server scope
     Display name: [INSTANCE]\Team Foundation Administrators
      Description: Members of this group can perform all operations on the Team Foundation Application Instance.

    4 member(s):
      [U] Datum1\hholt (Holly Holt)
      [U] Datum1\jpeoples (John Peoples)
      [G] BUILTIN\Administrators (BUILTIN\Administrators)
    s [A] [INSTANCE]\Team Foundation Service Accounts

    Member of 2 group(s):
    a [A] [Collection0]\Project Collection Administrators
    e [A] [INSTANCE]\Team Foundation Valid Users

    Done.

/g-:移除使用者或群組

使用 /g- 從現有的群組中移除使用者或使用者群組。

tfssecurity /g- groupIdentity memberIdentity [/collection:CollectionURL] [/server:ServerURL]

必要條件

若要使用 /g- 命令,您必須分別使用 / collection 或 /server 參數,將 [檢視集合層級資訊] 和 [編輯集合層級資訊] 或 [檢視實例層級資訊] 和 [編輯實例層級資訊] 許可權設定為 [允許]。 如需詳細資訊,請參閱 安全組和許可權參考

參數

引數 描述
groupIdentity 指定群組識別。 如需有效身分識別規範的詳細資訊,請參閱本文稍後的 身分識別規範
memberIdentity 指定成員識別。 如需有效身分識別規範的詳細資訊,請參閱本文稍後的 身分識別規範
/collection :CollectionURL 如果未使用 /server ,則為必要項。 以下列格式指定專案集合的 URL: http:// ServerName Port / VirtualDirectoryName / CollectionName
/server :ServerURL 如果未使用 /collection ,則為必要專案。 以下列格式指定應用層伺服器的 URL: http:// ServerName Port / VirtualDirectoryName

備註

在 Azure DevOps 應用層伺服器上執行此命令。

您也可以使用 Team Explorer 將使用者和群組新增至現有的群組。 如需詳細資訊,請參閱 從專案群組移除用戶設定專案或集合層級的許可權

範例:從伺服器層級群組移除使用者

下列範例會將 Datum1 網域使用者 John Peoples (Datum1\jpeoples) 從 Team Foundation Administrators 群組中移除。

注意

範例僅供解說之用,皆為虛構。 亦沒有任何預定或推斷的實際關聯。

tfssecurity /g- "Team Foundation Administrators" n:Datum1\jpeoples /server:http://ADatumCorporation:8080

範例輸出:

    TFSSecurity - Team Foundation Server Security Tool
    Copyright (c) Microsoft Corporation.  All rights reserved.

    The target Team Foundation Server is http://ADatumCorporation:8080/.
    Resolving identity "Team Foundation Administrators"...
    a [A] [INSTANCE]\Team Foundation Administrators
    Resolving identity "n:Datum1\jpeoples"...
      [U] DATUM1\jpeoples (John Peoples)
    Removing John Peoples from [INSTANCE]\Team Foundation Administrators...
    Verifying...

    SID: S-1-9-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-0-0-0-0-1

    DN:

    Identity type: Team Foundation Server application group
       Group type: AdministrativeApplicationGroup
    Project scope: Server scope
     Display name: [INSTANCE]\Team Foundation Administrators
      Description: Members of this group can perform all operations on the Team Foundation Application Instance.

    3 member(s):
      [U] Datum1\hholt (Holly Holt)
      [G] BUILTIN\Administrators (BUILTIN\Administrators)
    s [A] [INSTANCE]\Team Foundation Service Accounts

    Member of 2 group(s):
    a [A] [Collection0]\Project Collection Administrators
    e [A] [INSTANCE]\Team Foundation Valid Users

    Done.

/gc:建立專案層級群組

在命令提示字元使用 /gc 來建立專案層級群組。 若要從使用者介面建立專案層級群組,請參閱 管理使用者或群組

tfssecurity /gc Scope GroupName [GroupDescription] [/collection:CollectionURL]

必要條件

若要使用 /gc 命令,您必須將該專案的 [編輯 Project-Level 資訊] 許可權設定為 [允許]。 如需詳細資訊,請參閱 許可權參考

參數

引數 描述
範圍 您要新增專案層級群組之專案的 URI。 若要取得專案的 URI,請與其連線,然後開啟 Team Explorer,將滑鼠停留在 [首頁] 中的項目名稱上,然後讀取位址。 或者,在 Web Access 中連接到專案,並複製 URL。
GroupName 新群組的名稱。
GroupDescription 專案群組的描述。 選擇性。
/collection :CollectionURL 專案集合的 URL。 必要。 群組將會在專案集合內建立。 URL 的格式 為 http:// ServerName Port / VirtualDirectoryName / CollectionName

備註

在 Azure DevOps 應用層伺服器上執行此命令。

專案層級群組是您專案的安全組。 您可以使用專案群組授與符合您組織安全性需求的讀取、寫入及系統管理權限。

範例:將安全組新增至專案

下列範例會建立 URI "vstfs://Classification/TeamProject/00000000-0000-0000-0000-000000000000" 所指定之專案專屬的群組。 該群組名為 "Test Group",且具有描述 「此群組可供測試之用」。

注意

範例僅供解說之用,皆為虛構。 亦沒有任何預定或推斷的實際關聯。

您必須將佔位元 GUID 取代為您要建立此群組的專案 URI。 若要取得專案的 URI,請開啟 Team Explorer,以滑鼠右鍵按兩下專案,按兩下 [屬性],然後複製URL屬性的整個值。

執行命令之後,您可以在Team Explorer 中驗證群組。 以滑鼠右鍵按下您在命令中使用的專案,按兩下 [項目設定],然後按兩下 [群組成員資格]。 在 [TeamProjectName 上的專案群組] 對話方塊中,[群組] 清單會包括 [測試群組]。

注意

您可以使用 /gc 命令來建立群組,但不能將任何使用者新增至群組或指派任何許可權。 若要變更群組的成員資格,請參閱 /g+:將使用者或其他群組新增至現有的群組/g-:移除使用者或群組。 若要變更群組的許可權,請參閱 /a+:新增許可權/a-:從群組的成員資格中移除使用者或群組

tfssecurity /gc "vstfs:///Classification/TeamProject/00000000-0000-0000-0000-000000000000" "Test Group" "This group is for team members who test our code" /collection:CollectionURL

/gcg:建立伺服器或集合層級群組

使用 /gcg 命令來建立伺服器層級或集合層級群組。 若要從入口網站建立集合層級群組,請參閱 在專案或集合層級設定許可權

tfssecurity /gcg GroupName [GroupDescription] [/collection:CollectionURL] [/server:ServerURL]`

必要條件

若要使用 /gcg 命令,您必須將該專案的 [編輯專案層級資訊 ] 權限設定為 [允許]。 如需詳細資訊,請參閱 安全組和許可權參考

參數

引數 描述
GroupName 群組名稱。
GroupDescription 群組的描述。 選擇性。
/collection :CollectionURL 如果未使用 /server ,則為必要項。 以下列格式指定專案集合的 URL: http:// ServerName Port / VirtualDirectoryName / CollectionName
/server :ServerURL 如果未使用 /collection ,則為必要專案。 以下列格式指定應用層伺服器的 URL: http:// ServerName Port / VirtualDirectoryName

備註

在 Azure DevOps 應用層伺服器上執行此命令。

伺服器層級群組會直接在應用層上建立,並套用至所有專案集合。 集合層級是在專案集合層級建立。 它們會套用至該集合,而且對集合內的所有專案都有影響。 相反地,專案群組會套用至集合內的特定專案,但不適用於該集合中的其他任何專案。 您可以將許可權指派給伺服器層級群組,讓這些群組的成員可以在 Azure DevOps Server 本身執行工作,例如建立專案集合。 您可以將許可權指派給集合層級群組,讓這些群組的成員可以跨專案集合執行工作,例如管理使用者。

注意

您可以使用 /gcg 命令來建立群組,但您無法使用它將任何使用者新增至群組或指派任何許可權。 如需如何變更群組成員資格的資訊,請參閱 /g+:將使用者或其他群組新增至現有的群組/g-:移除使用者或群組。 如需如何變更群組許可權的資訊,請參閱 /a+:新增許可權/a-:從群組的成員資格中移除使用者或群組

範例:新增集合層級安全組

下列範例會建立名為 「Datum Testers」 且描述為 「A」 的集合層級群組。 Datum Corporation Testers。」

注意

範例僅供解說之用,皆為虛構。 亦沒有任何預定或推斷的實際關聯。

tfssecurity /gcg "Datum Testers" "A. Datum Corporation Testers" /collection:CollectionURL

下列範例會建立名為 「Datum Auditors」 且描述為 「A」 的伺服器層級群組。 Datum Corporation 稽核員。」

tfssecurity /gcg "Datum Auditors" "A. Datum Corporation Auditors" /server:ServerURL

/gd:刪除伺服器或集合層級群組

使用 /gd 刪除伺服器層級或集合層級群組。

tfssecurity /gd groupIdentity [/collection:CollectionURL] [/server:ServerURL]

必要條件

若要使用 /gd 命令,您必須分別使用 /collection/server 參數,將 [檢視集合層級資訊] 和 [編輯實例層級資訊] 或 [編輯實例層級資訊] 和 [編輯實例層級資訊] 許可權設定為 [允許]。 如需詳細資訊,請參閱 安全組和許可權參考

參數

引數 描述
groupIdentity 指定群組識別。
/collection :CollectionURL 如果未使用 /server ,則為必要專案。 以下列格式指定專案集合的 URL: http:// ServerName Port / VirtualDirectoryName / CollectionName
/server :ServerURL 如果未使用 /collection ,則為必要專案。 以下列格式指定應用層伺服器的 URL: http:// ServerName Port / VirtualDirectoryName

備註

在適用於 Azure DevOps 的應用程式層伺服器上執行此命令。 若要透過入口網站修改許可權,請參閱 在專案或集合層級設定許可權

範例:刪除集合層級安全組

下列範例會從專案集合中刪除群組。 此群組是由 「S-1-5-21-2127521184-1604012920-1887927527527-588340」,安全性標識碼 (SID) 。 如需尋找群組 SID 的詳細資訊,請參閱 /im:顯示組成直接成員資格的身分識別相關信息。 您也可以使用易記名稱來刪除群組。

注意

範例僅供解說之用,皆為虛構。 亦沒有任何預定或推斷的實際關聯。

tfssecurity /gd S-1-5-21-2127521184-1604012920-1887927527-588340 /collection:CollectionURL

/gud:變更伺服器或集合層級群組的描述

使用 /gud 來變更伺服器層級或集合層級群組的描述。

tfssecurity /gud GroupIdentity GroupDescription [/collection:CollectionURL] [/server:ServerURL]

必要條件

若要使用 /gud 命令,您必須將 [編輯專案層級資訊] 權限設定為 [允許]。 如需詳細資訊,請參閱 安全組和許可權參考

參數

引數 描述
GroupIdentity 指定群組識別。 如需有效身分識別規範的詳細資訊,請參閱本文稍後的 身分識別規範
GroupDescription 指定群組的新描述。
/collection :CollectionURL 如果未使用 /server ,則為必要專案。 以下列格式指定專案集合的 URL: http:// ServerName Port / VirtualDirectoryName / CollectionName
/server :ServerURL 如果未使用 /collection ,則為必要專案。 以下列格式指定應用層伺服器的 URL: http:// ServerName Port / VirtualDirectoryName

備註

在適用於 Azure DevOps 的應用程式層伺服器上執行此命令。

範例:將描述新增至安全組

下列範例會將描述「此群組的成員測試此項目的程式代碼」與 「Datum Testers」 群組產生關聯。

注意

範例僅供解說之用,皆為虛構。 亦沒有任何預定或推斷的實際關聯。

tfssecurity /gud "Datum Testers" "The members of this group test the code for this project" /collection:CollectionURL

/gun:重新命名群組

使用 /gun 重新命名伺服器層級或集合層級群組。

tfssecurity /gun GroupIdentity GroupName [/collection:CollectionURL] [/server:ServerURL]

必要條件

若要使用 /gun 命令,您必須分別使用 /collection/server 參數,將 [檢視集合層級資訊] 和 [編輯實例層級資訊] 或 [編輯實例層級資訊] 和 [編輯實例層級資訊] 許可權設定為 [允許]。 如需詳細資訊,請參閱 安全組和許可權參考

參數

引數 描述
GroupIdentity 指定群組識別。 如需有效身分識別規範的詳細資訊,請參閱本文稍後的 身分識別規範
GroupName 指定群組的新名稱。
/collection :CollectionURL 如果未使用 /server ,則為必要專案。 以下列格式指定專案集合的 URL: http:// ServerName Port / VirtualDirectoryName / CollectionName
/server :ServerURL 如果未使用 /collection ,則為必要專案。 以下列格式指定應用層伺服器的 URL: http:// ServerName Port / VirtualDirectoryName

備註

在適用於 Azure DevOps 的應用程式層伺服器上執行此命令。

範例:重新命名安全組

下列範例會重新命名集合層級群組 「A。 Datum Corporation Testers“ 至 ”A. Datum Corporation Test Engineers。」

注意

範例僅供解說之用,皆為虛構。 亦沒有任何預定或推斷的實際關聯。

tfssecurity /gun "A. Datum Corporation Testers" "A. Datum Corporation Test Engineers" /collection:CollectionURL

身分識別和成員資格

/i:顯示指定群組的識別資訊

使用 /i 在部署 Azure DevOps Server 時顯示指定群組的身分識別資訊。

tfssecurity /i Identity [/collection:CollectionURL] [/server:ServerURL]

必要條件

若要使用 /i 命令,您必須分別使用 /collection 或 /server 參數,將 [檢視集合層級資訊] 或 [檢視實例層級資訊] 權限設定為 [允許]。 如需詳細資訊,請參閱 安全組和許可權參考

參數

引數 描述
身分識別 使用者或應用程式群組的身分識別。 如需身分識別規範的詳細資訊,請參閱本文稍後的 身分識別規範
/collection :CollectionURL 如果未使用 /server ,則為必要專案。 以下列格式指定專案集合的 URL: http:// ServerName Port / VirtualDirectoryName / CollectionName
/server :ServerURL 如果未使用 /collection ,則為必要專案。 以下列格式指定應用層伺服器的 URL: http:// ServerName Port / VirtualDirectoryName

備註

在 Azure DevOps 應用層伺服器上執行此命令。

TFSSecurity 命令行公用程式的 /i 命令會顯示專案集合內每個群組的相關信息, (/server) 或應用層伺服器 (/instance) 。 它不會顯示任何成員資格資訊。

範例:列出安全組的身分識別資訊

下列範例會顯示 「Team Foundation Administrators」 群組的身分識別資訊。

注意

範例僅供解說之用,皆為虛構。 亦沒有任何預定或推斷的實際關聯。

tfssecurity /i "Team Foundation Administrators" /server:ServerURL 

範例輸出:

    Resolving identity "Team Foundation Administrators"...

    SID: S-1-9-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-0-0-0-0-1

    DN:

    Identity type: Team Foundation Server application group
       Group type: AdministrativeApplicationGroup
    Project scope: Server scope
     Display name: Team Foundation Administrators
      Description: Members of this application group can perform all privileged operations on the server.

範例:顯示安全組的身分識別資訊

下列範例會使用 adm: identity 規範顯示 Project Collection Administrators 群組的身分識別資訊。

tfssecurity /i adm: /collection:CollectionURL 

範例輸出:

    Resolving identity "adm:"...

    SID: S-1-9-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-0-0-0-0-1

    DN:

    Identity type: Team Foundation Server application group
       Group type: AdministrativeApplicationGroup
    Project scope: Server scope
     Display name: [DatumOne]\Project Collection Administrators
      Description: Members of this application group can perform all privileged operations on the project collection.

下列範例會使用 adm: identity 規範,顯示 「Datum」 專案之 Project Administrators 群組的身分識別資訊。

tfssecurity /i adm:vstfs:///Classification/TeamProject/ProjectGUID /collection:CollectionURL 

範例輸出:

    Resolving identity "adm:vstfs:///Classification/TeamProject/ProjectGUID"...

    SID: S-1-9-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-0-0-0-0-1

    DN:

    Identity type: Team Foundation Server application group
       Group type: AdministrativeApplicationGroup
    Project scope: Datum
     Display name: [Datum]\Project Administrators
      Description: Members of this application group can perform all operations in the project.

/im:顯示撰寫直接成員資格之身分識別的相關信息

使用 /im 來顯示組成您所指定群組之直接成員資格的身分識別相關信息。

tfssecurity /im Identity [/collection:CollectionURL] [/server:ServerURL]

必要條件

若要使用 /im 命令,您必須分別使用 /collection 或 /server 參數,將 [檢視集合層級資訊] 或 [檢視實例層級資訊] 權限設定為 [允許]。 如需詳細資訊,請參閱 安全組和許可權參考

參數

引數 描述
身分識別 使用者或群組的識別。 如需身分識別規範的詳細資訊,請參閱本文稍後的 身分識別規範
/collection :CollectionURL 如果未使用 /server ,則為必要項。 以下列格式指定專案集合的 URL: http:// ServerName Port / VirtualDirectoryName / CollectionName
/server :ServerURL 如果未使用 /collection ,則為必要專案。 以下列格式指定應用層伺服器的 URL: http:// ServerName Port / VirtualDirectoryName

備註

在 Azure DevOps 應用層伺服器上執行此命令。

TFSSecurity/im 命令只會顯示指定群組的直接成員。 此清單包含屬於指定之群組成員的其他群組。 然而,不會列出成員群組的實際成員。

範例:顯示安全組的成員資格識別

下列範例會顯示虛構公司 "A.Datum Corporation" 之 "Datum1" 網域中 "Team Foundation Administrators" 群組的直接成員資格識別資訊。 。

注意

範例僅供解說之用,皆為虛構。 亦沒有任何預定或推斷的實際關聯。

tfssecurity /im "Team Foundation Administrators" /server:ServerURL

範例輸出:

    Resolving identity "Team Foundation Administrators"...

    SID: S-1-9-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-0-0-0-0-1

    DN:

    Identity type: Team Foundation Server application group
    Group type: AdministrativeApplicationGroup
    Project scope: Server scope
    Display name: Team Foundation Administrators
    Description: Members of this application group can perform all privileged operations on the server.

    3 member(s):
      [U] Datum1\hholt (Holt, Holly)
      [G] BUILTIN\Administrators (BUILTIN\Administrators)
    s [A] [InstanceName]\Team Foundation Service Accounts

    Member of 2 group(s):
    a [A] [DatumOne]\Project Collection Administrators ([DatumOne]\Project Collection Administrators)
    e [A] [InstanceName]\Team Foundation Valid Users

    Done.

範例:顯示安全組的身分識別資訊

下列範例會顯示虛構公司 「A」 網域 「Datum1」 中 「DatumOne」 專案集合中 Project Collection Administrators 群組的身分識別資訊。 Datum Corporation,顯示方式是使用 adm: 識別規範。

tfssecurity /im adm: /collection:CollectionURL 

範例輸出:

    Resolving identity "adm: "...

    SID: S-1-9-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-0-0-0-0-1

    DN:

    Identity type: Team Foundation Server application group
    Group type: AdministrativeApplicationGroup
    Project scope: Server scope
    Display name: [DatumOne]\Project Collection Administrators
    Description: Members of this application group can perform all privileged operations on the project collection.

    5 member(s):
      [U] Datum1\jpeoples (Peoples, John)
      [U] Datum1\hholt (Holt, Holly)
      [G] BUILTIN\Administrators (BUILTIN\Administrators)
    a [A] [InstanceName]\Team Foundation Administrators
    s [A] [DatumOne]\Project Collection Service Accounts ([DatumOne]\Project Collection Service Accounts)

    Member of 1 group(s):
    e [A] [DatumOne]\Project Collection Valid Users ([DatumOne]\Project Colleciton Valid Users)

    Done.

範例:使用身分識別規範顯示安全組的身分識別資訊

下列範例會顯示虛構公司 「A」 網域 「Datum1」 中 「DatumOne」 專案集合中 「Datum」 專案之專案管理員群組的身分識別資訊。 顯示方式是使用 adm: 識別規範。

tfssecurity /im adm:vstfs:///Classification/TeamProject/ProjectGUID /collection:CollectionURL 

範例輸出:

    Resolving identity "adm:vstfs:///Classification/TeamProject/ProjectGUID"...

    SID: S-1-9-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXX

    DN:

    Identity type: Team Foundation Server application group
    Group type: AdministrativeApplicationGroup
    Project scope: Datum
    Display name: [Datum]\Project Administrators
    Description: Members of this application group can perform all operations in the project.

    2 member(s):
      [U] Datum1\jpeoples (Peoples, John)
      [U] Datum1\hholt (Holt, Holly)

    Member of 1 group(s):
    e [A] [DatumOne]\Project Collection Valid Users ([DatumOne]\Project Collection Valid Users)

    Done.

/imx:顯示展開成員資格之身分識別的相關信息

使用 /imx 來顯示組成指定群組擴充成員資格的身分識別相關信息。

tfssecurity /imx Identity [/collection:CollectionURL] [/server:ServerURL]

必要條件

若要使用 /imx 命令,您必須分別使用 / collection 或 /server 參數,將 [檢視集合層級資訊] 或 [檢視實例層級資訊] 許可權設定為 [允許]。 如需詳細資訊,請參閱 安全組和許可權參考

參數

引數 描述
身分識別 使用者或群組的識別。 如需身分識別規範的詳細資訊,請參閱本文稍後的 身分識別規範
/collection :CollectionURL 如果未使用 /server ,則為必要項。 以下列格式指定專案集合的 URL: http:// ServerName Port / VirtualDirectoryName / CollectionName
/server :ServerURL 如果未使用 /collection ,則為必要專案。 以下列格式指定應用層伺服器的 URL: http:// ServerName Port / VirtualDirectoryName

備註

在 Azure DevOps 應用層伺服器上執行此命令。

TFSSecurity/imx 命令只會顯示指定群組的展開成員。 這個清單不只包括屬於指定之群組成員的其他群組,也會列出成員群組的成員。

範例:顯示安全組的展開成員資格資訊

下列範例會顯示虛構公司 "A.Datum Corporation" 之 "Datum1" 網域中 "Team Foundation Administrators" 群組的擴充成員資格識別資訊。 。

注意

範例僅供解說之用,皆為虛構。 亦沒有任何預定或推斷的實際關聯。

tfssecurity /imx "Team Foundation Administrators" /server:ServerURL

範例輸出:

    Resolving identity "Team Foundation Administrators"...

    SID: S-1-9-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-0-0-0-0-1

    DN:

    Identity type: Team Foundation Server application group
    Group type: AdministrativeApplicationGroup
    Project scope: Server scope
    Display name: Team Foundation Administrators
    Description: Members of this application group can perform all privileged operations on the server.

    10 member(s):
      [U] Datum1\hholt (Holly Holt)
      [U] Datum1\jpeoples (John Peoples)
      [U] Datum1\tommyh (Tommy Hartono)
      [U] Datum1\henriea (Henriette Andersen)
      [U] Datum1\djayne (Darcy Jayne)
      [U] Datum1\aprilr (April Reagan)
      [G] Datum1\InfoSec Secure Environment
      [U] Datum1\nbento (Nuno Bento)
      [U] Datum1\cristp (Cristian Petculescu)
      [G] BUILTIN\Administrators (BUILTIN\Administrators)
    s [A] [InstanceName]\Team Foundation Service Accounts

    Member of 3 group(s):
    a [A] [DatumOne]\Project Collection Administrators ([DatumOne]\Project Collection Administrators)
    e [A] [DatumOne]\Project Collection Valid Users ([DatumOne]\Project Collection Valid Users)
    e [A] [InstanceName]\Team Foundation Valid Users

    Done.

下列範例會顯示虛構公司 「A」 網域 「Datum1」 中 「DatumOne」 專案集合中 Project Collection Administrators 群組的身分識別資訊。 顯示方式是使用 adm: 識別規範。

tfssecurity /imx adm: /collection:CollectionURL 

範例輸出:

    Resolving identity "adm: "...

    SID: S-1-9-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-0-0-0-0-1

    DN:

    Identity type: Team Foundation Server application group
    Group type: AdministrativeApplicationGroup
    Project scope: Server scope
    Display name: [DatumOne]\Project Collection Administrators
    Description: Members of this application group can perform all privileged operations on the project collection.

    6 member(s):
      [U] Datum1\jpeoples (Peoples, John)
      [U] Datum1\hholt (Holt, Holly)
      [G] BUILTIN\Administrators (BUILTIN\Administrators)
    a [A] [InstanceName]\Team Foundation Administrators
    s [A] [InstanceName]\Team Foundation Service Accounts
    s [A] [DatumOne]\Project Collection Service Accounts ([DatumOne]\Project Collection Service Accounts)

    Member of 1 group(s):
    e [A] [DatumOne]\Project Collection Valid Users ([DatumOne]\Project Collection Valid Users)

    Done.

範例:使用身分識別規範顯示安全組的身分識別資訊

下列範例會顯示虛構公司 「A」 網域 「Datum1」 中 「DatumOne」 專案集合中 「Datum」 專案之專案管理員群組的身分識別資訊。 顯示方式是使用 adm: 識別規範。

tfssecurity /imx adm:vstfs:///Classification/TeamProject/ProjectGUID /collection:CollectionURL 

範例輸出:

    Resolving identity "adm:vstfs:///Classification/TeamProject/ProjectGUID"...

    SID: S-1-9-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXX

    DN:

    Identity type: Team Foundation Server application group
    Group type: AdministrativeApplicationGroup
    Project scope: Datum
    Display name: [Datum]\Project Administrators
    Description: Members of this application group can perform all operations in the project.

    2 member(s):
      [U] Datum1\jpeoples (Peoples, John)
      [U] Datum1\hholt (Holt, Holly)

    Member of 2 group(s):
    e [A] [DatumOne]\Project Collection Valid Users ([DatumOne]\Project Collection Valid Users)
    e [A] [InstanceName]\Team Foundation Valid Users

    Done.

如需輸出規範的詳細資訊,例如 [G] 和 [U],請參閱本文稍後 的身分識別規範

/m:檢查明確和隱含群組成員資格

使用 /m 來檢查指定群組或用戶的明確和隱含群組成員資格資訊。

tfssecurity /m GroupIdentity [MemberIdentity] [/collection:CollectionURL] [/server:ServerURL]

必要條件

若要使用 /m 命令,您必須是 Team Foundation Administrators 安全組的成員。 如需詳細資訊,請參閱 安全組和許可權參考

注意

即使您是使用系統管理認證登入,還是必須開啟提升權限的命令提示字元來執行此功能。

參數

引數 描述
GroupIdentity 指定群組識別。 如需有效身分識別規範的詳細資訊,請參閱本文稍後的 身分識別規範
MemberIdentity 指定成員識別。 根據預設,這個自變數的值是執行命令的使用者身分識別。 如需有效身分識別規範的詳細資訊,請參閱本文稍後的 身分識別規範
/collection :CollectionURL 如果未使用 /server ,則為必要專案。 以下列格式指定專案集合的 URL: http:// ServerName Port / VirtualDirectoryName / CollectionName
/server :ServerURL 如果未使用 /collection ,則為必要專案。 以下列格式指定應用層伺服器的 URL: http:// ServerName Port / VirtualDirectoryName

備註

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

TFSSecurity 命令行公用程式的 /m 命令會檢查直接和擴充的成員資格。

範例:確認安全組中用戶的成員資格

下列範例會驗證使用者 「Datum1\jpeoples」 是否屬於 Team Foundation Administrators 伺服器層級群組。

注意

範例僅供解說之用,皆為虛構。 亦沒有任何預定或推斷的實際關聯。

tfssecurity /m "Team Foundation Administrators" n:Datum1\jpeoples /server:http://ADatumCorporation:8080

範例輸出:

    TFSSecurity - Team Foundation Server Security Tool
    Copyright (c) Microsoft Corporation.  All rights reserved.

    The target Team Foundation Server is http://ADatumCorporation:8080/.
    Resolving identity "Team Foundation Administrators"...
    a [A] [INSTANCE]\Team Foundation Administrators
    Resolving identity "n:Datum1\jpeoples"...
      [U] DATUM1\jpeoples (John Peoples)
    Checking group membership...

    John Peoples IS a member of [INSTANCE]\Team Foundation Administrators.

    Done.

安全性命名空間

注意

命名空間和令牌適用於所有版本的 Azure DevOps。 命名空間可能會隨著時間而變更。 若要取得最新的命名空間清單,請練習其中一個命令行工具或 REST API。 某些命名空間已被取代。 如需詳細資訊,請參閱 安全性命名空間和許可權參考

身分識別規範

您可以使用下表中的其中一個表示法來參考身分識別。

身分識別規範 描述 範例
希: 希。 參考具有指定安全性標識碼的身分識別, (SID) 。 sid:S-1-5-21-2127521184-1604012920-1887927527-588340
n:[D omain]Name 參考具有指定名稱的識別。 針對 Windows,Name 是帳戶名稱。 如果參考的身分識別位於網域中,則需要功能變數名稱。 對於應用程式群組,Name 是群組顯示名稱,而 Domain 是包含專案的 URI 或 GUID。 在此內容中,如果省略 Domain,則會假設範圍位於集合層級。 若要參考虛構公司 「A」 網域 「Datum1」 中使用者 「John一」的身分識別。 Datum Corporation:”

n:DATUM1\jpeoples

若要參考應用程式群組:

n:“Full-Time Employees”

n:00a10d23-7d45-4439-981b-d3b3e0b0b1ee\Vendors
adm:[Scope] 參考範圍的系統管理應用程式群組,例如伺服器層級的 「Team Foundation Administrators」 或集合層級的 「專案集合管理員」。 選擇性參數 Scope 是專案 URI 或 URL,包括其 GUID 和 連接字串。 如果省略 scope,則會根據使用 /instance 或 /server 參數來假設伺服器或集合範圍。 不論是哪一種情況,仍需要冒號。 adm:vstfs:///Classification/TeamProject/ Guid
srv: 參考服務帳戶的應用程式群組。 不適用
所有: 參考所有群組和身分識別。 不適用
字串 參考不合格的字串。 如果 String 開頭為 S-1-,則會將其識別為 SID。 如果 String 開頭為 CN=LDAP:// 則會識別為辨別名稱。 否則,字串會識別為名稱。 “Team testers”

類型標記

下列標記可用來識別輸出訊息中的身分識別和 ACE 類型。

識別類型標記

識別類型標記 Description
U Windows 使用者。
G Windows 群組。
A Azure DevOps Server 應用程式群組。
a [ A ] 系統管理應用程式群組。
s [ A ] 服務帳戶應用程式群組。
X 身分識別無效。
? 身分識別不明。

訪問控制項目標記

訪問控制項目標記 Description
+ 允許訪問控制專案。
- DENY 訪問控制專案。
* [] 繼承的訪問控制專案。