You can configure vRealize Automation to run your custom Visual Basic scripts as additional steps in the machine life cycle, either before or after machine provisioning. For example, you could use a pre-provisioning script to generate certificates or security tokens before provisioning, and then a post-provisioning script to use the certificates and tokens after machine provisioning. You can run Visual Basic scripts with any provisioning method, but you cannot use Visual Basic scripts with Amazon AWS machines.

Table 1. Running Visual Basic Scripts During Provisioning Checklist

Task

Location

Details

Check Box Install and configure the EPI agent for Visual Basic scripts.

Typically the Manager Service host

Check Box Create your visual basic scripts.

Machine where EPI agent is installed

vRealize Automation includes a sample Visual Basic script PrePostProvisioningExample.vbs in the Scripts subdirectory of the EPI agent installation directory. This script contains a header to load all arguments into a dictionary, a body in which you can include your functions, and a footer to return updated custom properties to vRealize Automation.

When executing a Visual Basic script, the EPI agent passes all machine custom properties as arguments to the script. To return updated property values to vRealize Automation, place these properties in a dictionary and call a function provided by vRealize Automation.

Check Box Gather the information required to include your scripts in blueprints.

Capture information and transfer to your infrastructure architects

Note:

A fabric administrator can create a property group by using the property sets ExternalPreProvisioningVbScript and ExternalPostProvisioningVbScript to provide this required information. Doing so makes it easier for blueprint architects to include this information correctly in their blueprints.

  • The complete path to the Visual Basic script, including the filename and extension. For example, %System Drive%Program Files (x86)\VMware\vCAC Agents\EPI_Agents\Scripts\SendEmail.vbs.

  • To run a script before provisioning, instruct infrastructure architects to enter the complete path to the script as the value of the custom property ExternalPreProvisioningVbScript. To run a script after provisioning, they need to use the custom property ExternalPostProvisioningVbScript.