I was working with vRealize Automation blueprints when i ran into a very interesting requirement. From vRA 7.1 onward, VMware introduced AD Policies which can automate creation of AD computer account during machine provisioning which is a very helpful feature. After upgrading environment from vRA 6.2 to vRA 7.3, I got requirement to automate AD computer account creation process. But this is where i ran into challenges:

Customer is using predefined hostnames in DNS, so they were using a workflow to take temporary machine prefix generated by vRA and replaced it with hostname reserved in DNS based on IP assigned to machine.

They had different blueprints and need to ensure that AD computer account is created in different Organization Unit in AD.

When using AD Policies, it creates computer account with tempname assigned to machine.

If computer account already exists in AD, then skip account creation.

So without further wait lets dive into Solution:

Solution Overview:

Complete Workflow in vRO

Step by Step Guide:

Let’s first start with creation of vRO workflow which we will use in Machine Provisioning Lifecycle.