ChangePassword Command
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
You can use the ChangePassword command to change the password settings for all the service accounts that Team Foundation Server uses. These accounts include the service account for Team Foundation Server (TFSService) and the service account for Team Foundation Server Proxy (TFSProxy). You can also use this command to script these changes. To manage the service accounts and their passwords interactively, you use the administration console for Team Foundation. For more information, see How to: Open the Team Foundation Administration Console.
Required Permissions
To use the ChangePassword command, you must be a member of the Team Foundation Administrators security group on the application-tier server for Team Foundation. You must also be a member of the sysadmin security group on the instance of SQL Server that is running on the data-tier server for Team Foundation. If you use the Proxy option, you must be an administrator on the proxy server. For more information, see Team Foundation Server Permissions.
Note
Even if you log on with administrative credentials, you must open an elevated Command Prompt window to perform this function on a server that is running Windows Server 2008. To open an elevated Command Prompt window, click Start, right-click Command Prompt, and click Run as Administrator. For more information, see this page on the Microsoft Web site: User Account Control.
TFSConfig ChangePassword [/AccountType:{ApplicationTier|Proxy}] /Account:AccountName /Password:Password
Parameters
Argument |
Description |
---|---|
AccountName |
Specifies the name of the account for which you want to change the password. You specify the name of the account in Domain\UserName or Computer\UserName format. |
Password |
Specifies the new password. |
Parameters |
Description |
---|---|
/AccountType:{ApplicationTier|Proxy} |
Specifies the type of service account for which you want to change the password. You specify ApplicationTier to change the password for the service account of Team Foundation Server, or you specify Proxy to change the password for the service account of Team Foundation Server Proxy. If you do not specify this parameter, you will change the password for the service account of Team Foundation Server. |
/Account:AccountName |
Specifies the name of the account for which you want to change the password. Specify AccountName by using one of the following forms: Domain\AccountName or Computer\AccountName. If you want to use a system account, such as Network Service or Local System, use the Computer\AccountName format. For more information about how to specify a system account, see the usage examples later in this topic. |
/Password:Password |
Specifies the new password. |
Remarks
You use the ChangePassword command to script changes to the password of a service account (for example, Domain\TFSService). Before you use this tool, you change the password for the account in the domain or on the computer. Then you run this tool to update the Team Foundation database with the new password.
ChangePassword updates the information that is stored in the configuration database, changing passwords for application pools, applying the changes by restarting the application pools, and updating the Visual Studio Team Foundation Background Job Agent service. For more information, see Team Foundation Background Job Agent.
Note
SQL Server synchronizes its service account passwords with Active Directory. You cannot use the ChangePassword command to modify any passwords for SQL Server, such as the password for the data sources account of Reporting Services (TFSReports).
Example: Change Service Account Password
You can use the following syntax to change the password of an account that is named ServiceAccount so that the new password would be newPassword. The utility iterates through the service accounts and changes only the passwords for the account that you specify.
TFSConfig ChangePassword /AccountType:ApplicationTier /Account:ServiceAccount /Password:newPassword
See Also
Tasks
How to: Change the Service Account or Password for SQL Server Reporting Services
How to: Change the Service Account or Password for Team Foundation Server
Other Resources
Managing Server Configuration with TFSConfig