cnaidunaveen
Contributor
Contributor

How to Add the vRealize Automation machine owner to the local Administrator group in Windows when provisioning. I need for VRA 8,

How to Add the vRealize Automation machine owner to the local Administrator group in Windows when provisioning. I need for VRA 8.

I tried creating a powershell script in actions and tried to run with blue print by using subscriptions. But I am getting errors while running the action.


Is there is a way to write in blue print as a yaml code to execute this?

This is one of the urgent requirement we had. Please provide me the solution.

5 Replies
daphnissov
Immortal
Immortal

I tried creating a powershell script in actions and tried to run with blue print by using subscriptions. But I am getting errors while running the action.

Well, you're going to have to fix your errors because this isn't a functionality built into 8 like it was in 7 (and I showed in my article which you saw).

Also let me respond to

This is one of the urgent requirement we had. Please provide me the solution.

Please read the first article in my signature. It's not our duty to provide you with solutions. If you have an "urgent requirement" you can open a support case with GSS. Again, please read the article in my signature.

0 Kudos
vSohill
Expert
Expert

Well GSS recommendation always ask the communicates first Smiley Happy

cdoola11
Enthusiast
Enthusiast

Try below line in a workflow with scriptable task  to capture the requester account. Then pass this value to another library workflow  "Run program in guest" with command to add user to local administrators.

var userName =  System.getContext().getParameter("__metadata_userName");

Finally,

Configure event subscription to run this workflow.

0 Kudos
siglert
Enthusiast
Enthusiast

OK this is how I solved the issue.  Making sure UAC is not turned on.  I created a powershell that I added as a resource item into VRO.  The powershell gets the name of an AD group and adds it to the local administrator group.  I created separate workflows for create the local admin access group in AD and  insert user into local admin access group, I placed them on a subscription to run at compute.provision pre.  Then at compute.provision.post I created a workflow that  waits for customization success then it copies the resource element to the vco and then it copies a file from VCO to the virtual machine.  I then check to make sure VMware tools are in READY state and the I run program (CMD.exe) in guest which I then call the powershell that I inserted running as a domain account and it finds the group and adds it to the local administrator group.  I m attaching the workflows.  I think everything you need should be in here.

0 Kudos
siglert
Enthusiast
Enthusiast

Local Admin Access package

0 Kudos