BuildMaster Documentation

Adding and Executing PowerShell scripts

BuildMaster makes it incredibly easy to use your current scripts to automate your application deployments by parsing through them and using their existing documentation to enrich the UI. Though your script will likely include all of the conventional documentation headers, BuildMaster will use only two of them: SYNOPSIS (a brief explanation of what the script or function does) and PARAMETER (an explanation of a specific parameter). But see this article for more information on documentation headers.

PowerShell scripts can be added as an Asset and then called as an operation in a plan, both of which are essentially just files.

Adding PowerShell Script in Assets

Click Assets > Click Create PowerShell Script > Enter script name > Click Save > Edit script > Click Save

(Note that you could also add a script in the Admin/global section by clicking Administration and then Script Assets under “Global Components”)

  • Visual
  • Text
Creates users in Active Directory
This will create multiple user accounts in Active Directory
$params = @{$FirstName="Ahmad";$Initials="AH";$LastName="Hamad";$ModifiedFullName="HamadAhmad";UserLogonName="ahamad";$Password="password1"} 
& “.\create-active-directory-users .ps1” @params
.PARAMETER $Initials
.PARAMETER $ModifiedFullName
Modify Full name to add initials or reverse the order of first and last names
.PARAMETER $UserLogonName 
.PARAMETER $Password
"Creating user $UserLogonName..."

Creating/Editing a Plan

Click Plans > Click Create Plan > Enter plan name > Click Create Plan > Save > Click plan name to edit

Calling the Script in a Plan

After writing our script and saving it as an asset, we can now invoke it by dragging and dropping a PS Call operation into the plan editor. The first thing you’ll notice in the UI is that a PS Call operation is created for our script by name, and the operation description (or Synopsis) inputted is displayed, as well.

And after dropping a PS Call operation into the plan editor, you can also see that BuildMaster has automatically created inputs for the Parameters we’ve set earlier. These changes in the UI precisely reflect the documentation and parameters we've added to our script, thus guiding us through the use of PS scripts in an easy and intuitive way. For our example, we're able to create user accounts in Active Directory directly with and from our plan.