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?
You never know, you might just want to take this knowledge and build a TFS PowerShell module from it! TFS provides a rich API that can be used in conjunction with PowerShell to build a handy way to control TFS with the command line and via PowerShell script.
A better way to review what's in the Power Tools and to get the full list of cmdlets installed by the TFS Power Tools is to use: Get-Command -module Microsoft.TeamFoundation.PowerShell This method doesn't depend on the developers including "TFS" in all the cmdlet names.
Run ‘tfs help’ for available commands. add [itemspec] [options]: Adds files and folders to version control. This means we can add the script tfs add library.tgs after we have built and packed our library to add it to our source control.
Unlike most of you reading this, administering Team Foundation Server (TFS) is my primary focus, not Windows PowerShell. In fact, I was pretty much a Windows PowerShell novice until a month ago.
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 :
First typing
tf workspaces /collection:http://appdev:8080/tfs/applications
This will list all workspaces belongs to you on your computer.
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.
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.
Mind the spelling: you want tf workspace
but you typed tf workspaces
which is a different command.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With