---
title: "Custom Action Scripts in Powershell & Javascript"
url: "https://courses.osherove.com/courses/automating-all-the-things-with-finalbuilder/custom-action-scripts-in-powershell-and-javascript.md"
canonical: "https://courses.osherove.com/courses/automating-all-the-things-with-finalbuilder/custom-action-scripts-in-powershell-and-javascript/"
tags: []
author: "Roy Osherove"
description: "Lesson 16 of 18 in Automating All the Things with FinalBuilder (Advanced Customization), 1:22. Free video by Roy Osherove."
usage: "Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page)."
license: "https://creativecommons.org/licenses/by/4.0/"
---

# Custom Action Scripts in Powershell & Javascript

1. [Courses](https://courses.osherove.com/#courses)
2. [Automating All the Things with FinalBuilder](https://courses.osherove.com/courses/automating-all-the-things-with-finalbuilder/)
3. Advanced Customization

Lesson 16 of 18

Duration: 1:22 [Watch on YouTube](https://www.youtube.com/watch?v=jQ7TGjTBcRI)

## In this lesson

Roy Osherove shows a relatively unknown feature of [FinalBuilder](https://osherove.com/blog/2005/3/12/cooltool-finalbuilder-30-the-ultimate-build-management-and-a.html "[CoolTool] FinalBuilder 3.0 - the ultimate build management and automation tool (osherove.com)"): every action has a script editor, where scripts in JavaScript, PowerShell, Python or VBScript run while the action executes and can use objects such as the action itself. He used it to change the TeamCity status on each action he cared about, by sending log messages in a specific format, but notes that it is usually not recommended because these scripts are relatively hidden.

## Transcript

202 words

[\[00:02\]](https://www.youtube.com/watch?v=jQ7TGjTBcRI&t=2s) One of the relatively unknown features in FinalBuilder is that you can script all actions to and gain even more control during runtime. Now, this is usually not recommended because these things are relatively hidden, but you can do very interesting things. For example, I wanted the TeamCity status to change on on every specific action that I care about. And to do that, I have to send out stuff to the log file in a specific format. And there was no easy way to do it just with the built-in actions.

[\[00:33\]](https://www.youtube.com/watch?v=jQ7TGjTBcRI&t=33s) So for each action just like you have build log next to it you have a script editor. So for an action I can change I can actually create scripts for that specific action while it executes either in JavaScript, PowerShell, Python or VBScript. And each one of these languages will have access to specific objects. For example, I have the action object here. Here I'm telling the action to send a log message with this specific string and then use action.action action description or for example action dot

[\[01:07\]](https://www.youtube.com/watch?v=jQ7TGjTBcRI&t=67s) Action log title or action name and that should basically execute to the log file every time I execute the action.

## Related

- [Outputting build status from FinalBuilder to TeamCity](https://osherove.com/blog/2009/5/19/outputting-build-status-from-finalbuilder-to-teamcity.html) · osherove.com

    Roy's note on sending build status from FinalBuilder to TeamCity by writing text in TeamCity's format to the console, what he uses action scripts for in this lesson.

- [Build and Continuous Integration - Toolgasm achieved](https://osherove.com/blog/2008/8/12/build-and-continuous-integration-toolgasm-achieved.html) · osherove.com

    A 2008 post on his team's TeamCity builds, some of which run FinalBuilder scripts.

### Also linked in this lesson

#### osherove.com

- [\[CoolTool\] FinalBuilder 3.0 - the ultimate build management and automation tool](https://osherove.com/blog/2005/3/12/cooltool-finalbuilder-30-the-ultimate-build-management-and-a.html)

[Previous lesson Useful General and Runtime Action Properties](https://courses.osherove.com/courses/automating-all-the-things-with-finalbuilder/useful-general-and-runtime-action-properties/) [Next lesson Invoking FinalBuilder from TFS/MSBuild](https://courses.osherove.com/courses/automating-all-the-things-with-finalbuilder/invoking-finalbuilder-from-tfs-msbuild/)


---

## About the author

**Roy Osherove**: Senior Solutions Architect at AWS working on AI for production and AI-driven development; author of The Art of Unit Testing and Elastic Leadership, with about 20 years of consulting and training on unit testing, TDD, team leadership and continuous delivery.

### Sites

- [RobotPaper](https://robotpaper.ai/): This blog: AI patterns and anti-patterns, AI and coding agents, and engineering leadership.
- [osherove.com](https://osherove.com): Roy's personal site. Author of The Art of Unit Testing and Elastic Leadership; consulting and training on unit testing, TDD, team leadership and continuous delivery, plus about 20 years of blog posts.
- [The Art of Unit Testing](https://www.artofunittesting.com): The Art of Unit Testing, 3rd Edition (Manning): readable, maintainable, trustworthy unit tests, plus TDD workshops in C#, JavaScript, Java and Kotlin.
- [5whys.com](https://www.5whys.com): Roy's writing on software team leadership: self-organizing teams, surviving chaos, learning mode and the Elastic Leadership model.
- [Pipeline Driven](https://pipelinedriven.org): Continuous delivery and DevOps practices: build patterns, pipeline-friendly testing, DevOps metrics and enterprise DevOps.
- [Elastic Leadership](https://www.elasticleadership.com): Elastic Leadership, Roy's framework for software team leaders (survival, learning and self-organizing modes).

### Social

- X: https://x.com/royosherove
- LinkedIn: https://www.linkedin.com/in/osherove/

### Contact

- Contact form: https://forms.gle/jQSx5KoXvrVA1JCK7

### License

Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page). License: https://creativecommons.org/licenses/by/4.0/
