pljdoyle wrote:
[Quoted Text] > I am wanting to export a list of usernames from an AD group & then > import them back into another group. I believe it is possible to do > this using the csvde command, but Im not sure of the syntax. Would some > one be kind enough to explain what syntax I would use for both of these > tasks please? > > Thanks
A VBScript solution would be similar to: =========== ' Bind to "source" group. Set objGroup1 = GetObject("LDAP://cn=Source Group,ou=West,dc=MyDomain,dc=com")
' Bind to "target" group. Set objGroup2 = GetObject("LDAP://cn=Target Group,ou=West,dc=MyDomain,dc=com")
' Enumerate direct members of "source" group. For Each objMember In objGroup1.Members ' Check if this object is already a member of "target" group. If (objGroup2.IsMember(objMember.AdsPath) = False) Then ' Make a member of "target" group. objGroup2.Add(objMember.AdsPath) Then Next
-- Richard Mueller MVP Directory Services Hilltop Lab - http://www.rlmueller.net --
|