Workspaces Command
Displays information about workspaces in the system and updates cached information about a user name or computer name change on the Team Foundation server.
tf workspaces [/owner:ownername] [/computer:computername]
[/server:servername] [/format:(brief|detailed)]
[/updateUserName:oldUserName] [/updateComputerName:oldComputerName]
workspacename
tf workspaces /remove:(*|workspace1[,workspace2,...])
/server:(*|server)
Parameters
Argument | Description |
---|---|
ownername |
Provides a value to the /owner option. Specify "*" to match workspaces created by any user. |
computername |
Provides a value to the /computer option. Specify "*" to match workspaces on any computer. |
servername |
Provides a value to the /server option. For example: TeamServer2. |
workspacename |
Specifies the name of a workspace to display information about. If a workspacename is not specified, information is displayed about all the workspaces in a server. You can also use the "*" wildcard character to display information about all workspaces for a server. |
oldUserName |
Provides the old user name for the /updateUserName option. |
oldComputerName |
Provides the old computer name for the /updateComputerName option. |
Option | Description |
---|---|
/owner |
Specifies the name of the user who created the workspace. If no owner is specified, Team Foundation returns information about workspaces owned by the current user only. |
/computer |
Specifies the name of a client computer by which to filter the list of workspaces for the server. If no computer is specified, Team Foundation returns information about workspaces on the current computer only. |
/server |
Specifies the name of the Team Foundation Server to use to filter the list of workspaces that you specify. If no servername is provided, Team Foundation returns information about workspaces on all known Team Foundation servers that use the local cache file. |
/format |
Specifies the format of the workspace information. Brief returns workspace information without mappings. Detailed returns workspace information and also the mappings. The detailed format can only be used when the /server option is specified. Brief is the default value. |
/updateUserName |
Updates security identification information on the Team Foundation server for a user whose network user name has been changed. If you specify this option, you must also specify a server by using the /server option. |
/updateComputerName |
Instructs Team Foundation to update its tables to reflect a change in the name of a client computer. If you specify this option, you must also specify a server by using the /server option. |
/remove |
Removes the specified workspace entries for the specified server from the client cache. |
Remarks
The workspaces command of the tf command-line utility displays information about workspaces on the current computer, owned by a specified user, or for all workspaces associated with a specific Team Foundation Server. For each workspace, Team Foundation displays the name, owner, and computer name. With detailed output, it also shows the workspace mappings. Unless you provide a filter such as owner, computer or workspace name, Team Foundation only displays information about the workspaces that you have created.
For more information about how to edit workspace properties, see Workspace Command.
Examples
The following example displays a list of all workspaces for the current user on the current computer.
c:\projects>tf workspaces
The following example displays the list of all workspaces for all users on all computers that have been created on the server teamserver2.
c:\projects>tf workspaces /owner:* /computer:* /server:teamserver2.
The following example displays detailed information about all workspaces that the current user has created for the teamserver2 server.
c:\projects>tf workspaces /computer:* /format:detailed /server:teamserver2
The following example displays detailed information including a list of workspace mappings about the workspace “WS1,” which is owned by the current user and is located on the current computer.
c:\projects>tf workspaces /format:detailed /server:teamserver2 WS1
The following example removes all cached workspaces from the cache for server teamserver2.
c:\projects>tf workspaces /remove:* /server:teamserver2
Security
To use the workspaces command, you must have the Read permission set to Allow. For more information, see Team Foundation Server Permissions.
See Also
Tasks
Reference
Command-Line Syntax
Workspace Command
Workfold Command
Concepts
Working with Source Control Workspaces