What’s New in TFS 2013: Team Builds are able to run in Powershell

One of the new features that I really like in the TFS 2013 is the ability to run scripts using the Default template. This is a huge time saver! Before we had to create a custom activity to call the scripts and pass in the parameters.

Lets get start on showing you this new feature of running the PowerShell script in the Default template

Add a PowerShell script to your source control


In TFS 2013 | Team Explorer | Builds | Right click a build definition | Select Edit Build Definition | The Build definition properties for the build will open.

In the Build definition properties | Select the Source Settings | Make sure that the script is added to the working folder


In the Build definition properties | Click on Process | The Build Process template will open


In 2. Build section | Expand 5. Advanced | the MSBuild, Post and Pre script will show.

Add the location of the script and any parameters the script requires

Run the build and verify the results

In the build results | Click on Diagnostics | Click on View Logs | The Diagnostics web page will open



Verify that your script ran as expected


The new features of being able to run script from the default template give great flexibility and time saving in build-out a robust continuous workflow. Now I add my pre and postscripts to update my target environment or to preform cleanup tasks.




About the Author:

Leave A Comment