简体   繁体   中英

Is there a way to check out a file under a different username using tfs powershell snapin?

I'd like to checkout a file under a different username using powershell's tfs snapin. Except, I don't see a login or user switch when I lookup Add-TfsPendingChange .

Is there a way of doing this?

I'd rather not switch between the snapin and the cmd line versions if possible. Shouldn't need to do that anyway.

TFS power-shell snapin use the credential which is entered when create the workspace and only provide basic version control commands feature. Call "tf.exe" in powershell script directly would be an easy way to achieve the feature you want. If you don't like this method, you can involve TFS API in your powershell script. Refer to "Beyond the basics" in this link for details: PowerShell and TFS: The Basics and Beyond .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM