Quantcast
Channel: VMware Communities : Discussion List - vRealize Orchestrator
Viewing all articles
Browse latest Browse all 6251

Adding one user group to another, taking strings as arguments

$
0
0

For something that should be very straight forward, this has had me tearing my hair out for hours now...

 

We're currently running version 2.0.3 of the Active Directory Plugin.

 

I found the included workflow "Add Groups to group members".

 

Upon opening it, I found the following line;

userGroup.addElements(groups);

 

Easy as pie I thought.  Takes an AD:UserGroup Object, along with an array of AD:UserGroup objects.

 

So, all I need to do is create a scriptable task that takes in a string and retrieves the associated Active Directory Object...

 

// SourceGroup is the included group

var srcgrp = ActiveDirectory.search("UserGroup",sourceGroup);

 

// Target Group (The one we're going to add the groups too)

var taggrp = ActiveDirectory.search("UserGroup",targetGroup);

 

But here's where the wheels come off...

 

The search method appears to return an array of "AD_UserGroup" type objects.

 

For the life of me, I CAN NOT figure out how to convert AD_UserGroup objects into the AD:UserGroup objects that the "Add Groups to group members" workflow requires.

 

Any help or advice on this would be hugely appreciated!


Viewing all articles
Browse latest Browse all 6251

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>