Automate101, Level 27, PwC Tower 188 Quay Street Auckland 1010 [email protected]

Using Atria Provisioning Processes to execute PowerShell scripts

Atria 12.6.7 introduced a new PowerShell action.  This feature gives you the ability to extend our default provisioning processes to meet your own needs.   It also allows you to build your own services using Atria custom services. 

Key benefits

  • Execute custom PowerShell scripts
  • Leverage existing scripts and add to core Atria processes
  • Easy to pass variables from provisioning requests, into your script

How it works

Action Parameters

When creating provisioning rules, select the Powershell Run Script action

ScriptFile

Specify the location of your AD script.  The script is executed from the provisioning server, so store the script on the provisioning server, and make sure the path is correct

resultProperty

This specifies the property for any data you wish to return to the provisioning request from the script.

variables

Add optional parameters to pass information from the provisioning request into your script.  To add parameters, increase the Optional Parameters property.

Note the Syntax for variables, this is configuring the PowerShell variables in your script.  Each of the $variables defined will be set up and available to use within your script.

Parameters are passed by value, any changes made, will not be reflected in the request variables after the action has executed.  If you want to return data, send it back out through the resultProperty property.

Writing your script

When you attach to provisioning events, the system does not differentiate between a create (the first execution) and an update (any subsequent execution), as such you need to ensure that your script can be re-executed and caters for objects which may have already been created by a previous execution of the script. 

Tips…

Provisioning Processes in Atria can be viewed and modified with the Atria provisioning manager, this is installed alongside the provisioning engine.

If you want to extend existing processes, add your provisioning rules to the “After Provision” event section, these will be retained after upgrading services or components.

Read More information on how to customise provisioning processes