I needed to automate a full deployment of all my services, databases and the client that consumed them frequently.
I am using an on premise installation of Team Foundation Server (TFS) 2012 and Visual Studio 2015. I needed to leverage multiple builds since msbuild arguments (the ones that you use to automatically publish/deploy) apply to every project/solution being built. This can potentially lead to multiple different builds.
Fortunately, this can be accomplished using PowerShell. TFS provides a good useful well-documented interface.
Below are some helpful references that I found on my way to the above solution.
I recently started working with a different TFS instance and version only to discover the script produced the below error. I have updated it accordingly.
- TFS Build API by Example #1: Queue a build.
- Queuing TFS Build from Powershell Script Which is Called from TFS Build
- Queuing a build in PowerShell
- relative path in Import-Module
- Powershell import-module doesn’t find modules
- How to set a custom tfs build parameter using powershell