Specialized Administration > Working with Properties and Command Line Utilities > Local and Shared Team Command Line Utilities > Deleting Local Team Roles
  
Deleting Local Team Roles
Use the DeleteLocalTeamRoles utility to delete local team roles from an existing application context. When the role is deleted, all participants in that role are also removed, unless they are in another role. The context manager role and the guest role cannot be deleted. This utility is often run after the AddSharedTeamToContexts utility to clean up the modified contexts. Only site administrators can run this utility.
* 
Once you have run this utility, the role and participant removal cannot be reversed. Be sure to carefully evaluate team and role membership prior to running this utility to ensure that your team membership and participant access control permissions are accurate.
To delete local team roles:
1. Create a text file that contains a list of roles that you want to remain in the local team.
Use the following format to create the text file.
ExcludedRoles:<Role Name>
<container path>
where <Role Name> is the comma-separated list of internal or display names of roles that you want to remain in the context and <container path> is the container path or the container identifier of the context whose context team you want to modify. If you want to remove all roles except Guest and context manager from the local team, you do not need to specify anything after the colon. For more information, see Finding the Object or Container Identifier.
* 
Make sure that all excluded roles included in the ExcludedRoles element match the name of the role in Windchill. If the role name is not an exact match, the role you intended to exclude will be deleted.
If you want to remove the role from multiple contexts, list each context on a new line after the ExcludedRoles element. In the following example, all roles except Guest and Project Manager are removed from Project A and all roles except Members, Collaboration Manager, Guest, and Product Manager are removed from Product B and Product C.
* 
The Guest and context manager roles cannot be deleted, even if they are not specified in the ExcludedRoles element.
ExcludedRoles:
/wt.inf.container.OrgContainer=Test Organization/wt.projmgmt.admin.Project2=Project A
ExcludedRoles: Members, Collaboration Manager
/wt.inf.container.OrgContainer=Test Organization/wt.pdmlink.PDMLinkProduct=Product B
/wt.inf.container.OrgContainer=Test Organization/wt.pdmlink.PDMLinkProduct=Product C
2. Save the text file to your local hard drive.
3. From a windchill shell, run the following command:
windchill wt.inf.team.DeleteLocalTeamRoles <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.DeleteLocalTeamRoles “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 participant in one of the roles has an object checked out, the utility skips that context and logs an error in the output.