Специализированное администрирование > Работа со свойствами и утилитами командной строки > Local and Shared Team Command Line Utilities > Adding a Shared Team to an Existing Context
  
Adding a Shared Team to an Existing Context
Typically, a shared team can only be associated with an application context when that application context is created. The AddSharedTeamToContexts command line utility allows you to add a shared team to an existing context so that the context has both a local and a shared team.
* 
When you run this utility, the context’s Default domain moves under the administrative domain associated with the shared team. Make sure to check the policy access control rules for the domain in which your application contexts will reside to ensure that you have the appropriate rules in place.
For more information about shared team domains, see About Shared Teams.
To run the utility, both the shared team and the application context must exist and must be in the same organization context. Only site administrators can run this utility. To add a shared team to an application context:
1. Create a text file that contains the shared team and list of contexts to which you want to apply the shared team. Use the following format to create the text file.
SharedTeam:<shared team>
<container path>
where <shared team> is the shared team name or object identifier and <container path> is the container path or the container identifier of the context whose context team you want to modify. For more information, see Finding the Object or Container Identifier.
a. If you want to apply the same shared team to multiple contexts, list each context on a new line.
b. If you want to specify a different shared team, add another SharedTeam block on a new line.
The following example has multiple shared teams and contexts.
SharedTeam:Shared Team 1
/wt.inf.container.OrgContainer=Test Organization/wt.projmgmt.admin.Project2=Project A
/wt.inf.container.OrgContainer=Test Organization/wt.pdmlink.PDMLinkProduct=Product B
/wt.inf.container.OrgContainer=Test Organization/wt.inf.library.WTLibrary=Library C
SharedTeam:wt.inf.team.ContainerTeam:74986
/wt.inf.container.OrgContainer=Test Organization/wt.projmgmt.admin.Project2=Project D
SharedTeam:Shared Team 3
wt.projmgmt.admin.Project2:1048785
* 
Each application context can have either a shared team or a local team. A context cannot have more than one shared team.
2. Save the text file to your local hard drive.
3. From a windchill shell, run the following command:
windchill wt.inf.team.AddSharedTeamToContexts <Text File Path>
where <Text File Path> is the location of the text file you created.
* 
If your text file contains spaces in the file name, put quotation marks (“) around the file path in the command. For example, windchill wt.inf.team.AddSharedTeamToContexts “C:\Windchill\Shared Team Conversion.txt”.
After the utility runs, a log file is created and its location is specified in the windchill shell. A new log file is created each time you run the utility. If a shared team is not marked as extendable or is not enabled, the utility updates the shared team accordingly and will still run. If a context is not found, is already associated with a shared team, or is a context with private access, the utility skips that context and continues. If the shared team specified in the text file is not found, the utility stops and an error message appears.