Octopus API Part 1b: Building a Function For Returning Properties


The previous post touched briefly on the notion that we can get a property of an Octopus Project and set a PowerShell variable to that value. As noted, there are several properties, and if we want to automate the process we could create a Function to return us a given property, providing it exists.

Below is a very simple function that will return the value of a property.

This is quite straightforward: all we need to do is change the $prop value to the name of any property for (in this case at least) a project and it will return a value.


Leave a Reply

Your email address will not be published. Required fields are marked *