Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: List Groups in OU
AddExtender("wwads44i.dll") GlobalDistributionGroup = 2 LocalDistributionGroup = 4 UniversalDistributionGroup = 8 SecurityGroup = -1 ServerDn=dsGetProperty("LDAP://rootDSE", "serverName") ServerName=ItemExtract(1, ServerDn, ",") ServerName=ItemExtract(2, ServerName, "=") ServerDn=dsGetProperty("LDAP://rootDSE", "defaultNamingContext") ServerPath="LDAP://" : ServerName : "/" : ServerDN groups_in_OU = dsFindPath(ServerPath, "(&(objectCategory=group) (groupType=%GlobalDistributionGroup%))") sGroupPath = AskItemlist('GlobalDistributionGroup in OU: ':ServerPath, groups_in_OU, @TAB, @UNSORTED, @SINGLE ) groups_in_OU = dsFindPath(ServerPath, "(&(objectCategory=group) (groupType=%LocalDistributionGroup%))") sGroupPath = AskItemlist('LocalDistributionGroup in OU: ':ServerPath, groups_in_OU, @TAB, @UNSORTED, @SINGLE ) groups_in_OU = dsFindPath(ServerPath, "(&(objectCategory=group) (groupType=%UniversalDistributionGroup%))") sGroupPath = AskItemlist('UniversalDistributionGroup in OU: ':ServerPath, groups_in_OU, @TAB, @UNSORTED, @SINGLE ) groups_in_OU = dsFindPath(ServerPath, "(&(objectClass=group)(groupType:1.2.840.113556.1.4.804:=%SecurityGroup%) )") sGroupPath = AskItemlist('SecurityGroup in OU: ':ServerPath, groups_in_OU, @TAB, @UNSORTED, @SINGLE ) exit
Article ID: W17532
Filename: List Groups in OU.txt
File Created: 2014:06:20:10:04:34
Last Updated: 2014:06:20:10:04:34