Created
February 19, 2020 22:11
-
-
Save mccbryan3/a36e74bb7be67090b39f46e35111108e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arr_groups = new Array() | |
System.log(nameStartsWith) | |
System.log("Running active Directory Search") | |
var groups = ActiveDirectory.search("UserGroup", nameStartsWith) | |
var arr_ExceptionList = exceptionList.split(",") | |
for (var i in groups) { | |
if(arr_ExceptionList.indexOf(groups[i].name) == -1) { | |
arr_groups.push(groups[i].name) | |
} | |
} | |
return arr_groups |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
vRO - Get AD Groups in and Array to present in a dropdown with Exceptions
Usage of this script as an action in vRo:
This is an action script in vRo that should have two inputs as string.
Usage of this action in vRa blureprint custom form:
This should be set as a action based field in vRa and configured as pictured below.
Two examples below showing no exceptions with the "none" as a place holder and the other with multiple groups seperated by comma with no spaces.
The nameStartsWith fieled is the beginning of your group name. The exceptionList is a string that will be split by the comma in the action script to create an array of group names.