Search code examples
powershellazure-devopstfvc

Download file from VSTS with lightweight client (PowerShell)


I code PowerShell, and save it to my VSTS account. But when I code costumer specific Powershell script, I write them in my VS on my computer, then download them/the file from the customer server via web.

Is there any lightweight client or PowerShell script to download the latest version of a given file or folder from a private VSTS repository? So I don't have to install anything on the customer server, and I can easily update the local file with a saved script.

It's a TFVC repository, not GIT repository if that makes a difference.


Solution

  • Neno Loje has built a small tool that can download one or more files directly from TFVC. It needs a couple of Client Object Model files, which are taken from the new TFS Client Object Model nuget files.

    You can find it here:

    enter image description here

    The TFS 2015/2017 version will work against VSTS as well as pretty much any TFS server out there regardless of the version.

    Alternatively, you could use the TFS Cross Platform Command Line, as long as Java is available on the target server