5
votes

I am trying to change the owner of a TFS Project Collection with this command:

tf workspaces /collection:http://appdev:8080/tfs/applications applications;OLD.OWNER /newowner:NEW.OWNER

But I am getting this error:

Unrecognized command option 'newowner`


I also tried with workspace instead of workspaces as suggested by Giulio, but with this error:

The workspace applications;OLD.OWNER does not exist. Please specify an existing workspace or /new to create one.


Also tried adding a /computer:COMPUTERNAME switch, but this gives the same error as the previous attempt.


Interestingly, when I try querying all workspaces with

tf workspaces /collection:http://appdev:8080/tfs

I get:

Unable to retrieve the registration information for 'ISCCProvider'

And the same error is produced if I specify the computer


I am running this command from the Developer Command Prompt for VS2015, but not on the TFS server itself (I am running it from my machine).

I am the owner of all project collections.

I am able to call tf workspaces without any issue, and I can also call tf workspaces /collection:http://appdev:8080/tfs/applications with the expected results.

What could possibly be going wrong here?

3
What do you mean about change the owner for project collection? There is no owner for a project collection in TFS. - Eddie Chen - MSFT
@Eddie-MSFT Hi Eddie, I think what I mean to say is to change the owner of a workspace - Bassie

3 Answers

6
votes

When you typing

tf workspaces /collection:http://appdev:8080/tfs

You will definitely get this error

Unable to retrieve the registration information for 'ISCCProvider'

Since this command tf workspaces it's collection level not server level, your address (http://appdev:8080/tfs) is server url, you just need to add your collection info of the url such as http://appdev:8080/tfs/applications The error will disappear.


In your case :

  1. First typing

    tf workspaces /collection:http://appdev:8080/tfs/applications

    This will list all workspaces belongs to you on your computer.

  2. Then typing

    tf workspace/collection:http://appdev:8080/tfs/applications workspacename/newowner:xxx

    The workspace name is the one which you want to change the owner. You can get the info from the first command. You don't have to add the older owner name and option, just need to add new owner name.

  3. Finally you cloud also typing

    tf workspaces /collection:http://appdev:8080/tfs/applications

    again, you will see the changed workspace will not list any more. This is make sense, since the owner is changed and the workspace not longer belongs to you.

2
votes

Mind the spelling: you want tf workspace but you typed tf workspaces which is a different command.

1
votes

tf workspace and tf workspaces command is used to set/configure the workspaces, and the command used to change the owner of the workspace is:

tf workspace /collection:http://appdev:8080/tfs/collectionname workspacename;oldowner /newowner:newowner

You cannot use this command to change the settings for project collection.