Courion Tip–LDIF file creation pt 2

Here’s a snippet of code I used to determine the correct name of the group for a user to be added to….
' What Group to join
GroupName = InputBox("Enter PART of the group name that the user needs to be a member of")
REM WScript.Echo("User will be a member of : "&GroupName)
strSQLQuery = "select distinct groupname from staging_oidgroups where groupname like "&"'"&groupname&"'"
REM wscript.echo strSQLQuery
Set objRS = objCN.Execute(strSQLQuery)

And here’s what you should format your *.ldif file to look like:
dn: cn=group name goes here,cn=groups,dc=company name,dc=com
changetype: modify
add: UniqueMember
uniquemember: cn=users common name,cn=users,dc=company name,dc=com

Advertisements

Posted November 29, 2010 by mmdmurphy in Courion Tip

%d bloggers like this: