This use case will list the steps to construct an orchestration policy to automatically update your MS SQL database using custom scripts whenever a user-specific action is performed in ADManager Plus.
How will this orchestration work?
User-specific arguments will be used to locate the users in the database and based on the request sent, appropriate action will be carried out in the product.
- When an insert request is initiated, a row will be inserted into the database table and the values specified in the request will be added to the specified columns.
- When an update request is initiated, the values in the specified columns will be replaced with the values specified in the request.
- When a delete request is initiated, the specified columns or rows will be deleted from the database.
Prerequisite: Ensure that the MS SQL script is downloaded and moved into the <InstallationDirectory>\ADManager Plus\Scripts folder.
Steps to orchestrate this event
Creating an orchestration template using custom scripts
- Log in to ADManager Plus and navigate to the Automation tab.
- In the left pane, under Configuration click Orchestration Template.
- Drag and drop the Custom Script logic block under Custom Actions, fill in the following and click Save.
- Block Name: Enter a suitable name for this Custom Script block.
- Description: Describe the action that will be executed.
- Script Type: Select PowerShell as the script type from the drop-down list.
- Script Path: Enter the absolute file path or filename.
E.g., MSSQL_Insert.ps1\MSSQL_Update.ps1\MSSQL_Delete.ps1
- Arguments: Provide the arguments as comma-separated values. Refer to the table below to find the list of arguments that can be passed in the request.
Creating a new Event-driven Automation to configure the conditions under which the template will be executed
- Log in to ADManager Plus as the admin.
- Navigate to Automation → Configuration → Event-driven Automation.
- Click the Create New Automation button on the top-right corner of the page.
- Enter a suitable Name and Description for the profile.
- In the Criteria section, add the conditions under which the template needs to be executed. For example, when the Create Single User action or Create Bulk Users option is performed.
- In the Event-driven Automation add the Orchestration Template you had created from the list.
- Click Save.