Skip to content

Instantly share code, notes, and snippets.

@raptium
Created April 25, 2009 03:35
Show Gist options
  • Save raptium/101480 to your computer and use it in GitHub Desktop.
Save raptium/101480 to your computer and use it in GitHub Desktop.
' Replace group membership with all-new members
Const ADS_PROPERTY_UPDATE = 2
Set objGroup = GetObject _
("LDAP://cn=testgroup,ou=Users,dc=it,dc=shkp,dc=com,dc=hk")
objGroup.PutEx ADS_PROPERTY_UPDATE, "member", _
Array("cn=keatslee,ou=Users,dc=it,dc=shkp,dc=com,dc=hk", _
"cn=fionachan,ou=Users,dc=it,dc=shkp,dc=com,dc=hk")
objGroup.SetInfo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment