Adding Cross-Domain Users Into Domain Local Groups
Hi all,
I'm trying to add a user from 'domainA' into a domain local group on
'domainB'.
Here is the code I am using;
Set objGroup = GetObject("LDAP://CN=DomainLocalGroup, OU=Users, DC=domainB,
DC=INTERNAL")
Set objUser =
GetObject("LDAP://CN=AccountName,OU=Users,DC=domainA,DC=INTERNAL")
objGroup.Add (objUser.ADsPath)
Whenever I try I see the following error message:
Run-time error '-2147016656 (80072030)1;
Automation error
There is no such object on the server.
Now, I know for a fact that the above is connecting to both the correct
group and correct user as I've managed to pull out other information about
them into a msgbox. It's as if the 'objGroup.Add' can't see the user on the
other domain.
Do I need to use another function to do this? Can anyone point me in the
right direction please?
Thanks in advance,
Matt.
date: Tue, 20 Dec 2005 02:27:02 -0800
author: Tomski