[英]Get Latest version of a project from tfs using powershell
I am trying to automate our routine developer tasks using powershell. 我正在尝试使用PowerShell自动执行我们的常规开发人员任务。 I am halfway through with my powershell script.
我的PowerShell脚本已经过了一半。
I want to get latest version of a particular project from TFS. 我想从TFS获得特定项目的最新版本。 Developer will have access to several project in TFS.
开发人员可以访问TFS中的多个项目。 Out of those projects, files under specific project needs to be updated.
在这些项目中,需要更新特定项目下的文件。
I will be running powershell script on developer's machine where TFS path is already set and developer has permission to access TFS. 我将在开发人员的机器上运行powershell脚本,其中已经设置了TFS路径并且开发人员有权访问TFS。 I googled it for a while, but could not get the answer.
我用谷歌搜索了一段时间,但无法得到答案。
Here is the way I use : 这是我使用的方式:
1) You have to install Microsoft Visual Studio Team Foundation Server 2012 Power Tools . 1)您必须安装Microsoft Visual Studio Team Foundation Server 2012电动工具 。 you need to install the Windows PowerShell cmdlets.
您需要安装Windows PowerShell cmdlet。
The Windows PowerShell cmdlets need the .NET Framework 3.5 Windows Feature installed. Windows PowerShell cmdlet需要安装.NET Framework 3.5 Windows功能。
Windows PowerShell Execution Policy needs to be configured. 需要配置Windows PowerShell执行策略。 Restricted Execution Policy does not work.
受限制的执行策略不起作用。
2) After installing the prerequisites, you can use version control. 2)安装先决条件后,您可以使用版本控制。
Open the Windows PowerShell console, and then load the Team Foundation cmdlets from the Visual Studio Team Foundation Server 2012 Power Tools. 打开Windows PowerShell控制台,然后从Visual Studio Team Foundation Server 2012电动工具加载Team Foundation cmdlet。
Get-PSSnapin –Registered
Add-PSSnapin Microsoft.TeamFoundation.PowerShell
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.