Adding Users a group in AD 
Author Message
 Adding Users a group in AD

I have a group in an OU that I am trying to add a user to.  Here is my
syntax

Set grp = GetObject(LDAP://CN=Students,OU=Students,DC=2kdemo,DC=com)
grp.Add "CN=Brad Smith,OU=Students,DC=2kdemo,DC=com"

I am getting the following return

arg.vbs(3,1) (null): 0x80005000

Any Ideas ??

Thanks,

Brad



Mon, 22 Nov 2004 00:02:04 GMT  
 Adding Users a group in AD
What is line 3?

I'm guessing it's the 2nd one you showed, but it looks like you are doing this
from memory (you left out the "" marks in line 1 for example)...

IIRC, that error can occur if you have an invalid path specified.


Quote:
> I have a group in an OU that I am trying to add a user to.  Here is my
> syntax

> Set grp = GetObject(LDAP://CN=Students,OU=Students,DC=2kdemo,DC=com)
> grp.Add "CN=Brad Smith,OU=Students,DC=2kdemo,DC=com"

> I am getting the following return

> arg.vbs(3,1) (null): 0x80005000

> Any Ideas ??

> Thanks,

> Brad



Mon, 22 Nov 2004 05:15:09 GMT  
 Adding Users a group in AD
Yeah .. found out the syntax is actually as follows .. to make it work that
is

Set grp = GetObject("LDAP:// etc ....")
grp.Add (LDAP://CN= etc ... )

I was leaving out the LDAP:// on the grp.Add statement .. added that and
everything went peachy

=)

Thanks

Brad


Quote:
> What is line 3?

> I'm guessing it's the 2nd one you showed, but it looks like you are doing
this
> from memory (you left out the "" marks in line 1 for example)...

> IIRC, that error can occur if you have an invalid path specified.



> > I have a group in an OU that I am trying to add a user to.  Here is my
> > syntax

> > Set grp = GetObject(LDAP://CN=Students,OU=Students,DC=2kdemo,DC=com)
> > grp.Add "CN=Brad Smith,OU=Students,DC=2kdemo,DC=com"

> > I am getting the following return

> > arg.vbs(3,1) (null): 0x80005000

> > Any Ideas ??

> > Thanks,

> > Brad



Mon, 22 Nov 2004 05:25:57 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Add and remove AD user to and from local group

2. Find user in AD and add them to group

3. Find user in AD and add them to group

4. VB script: adding AD group to local administrators group

5. Add Domain Users Group to Powe Users Group in Script

6. Adding multiple users or groups to local groups

7. Adding a computer account to an AD group

8. Adding computer to global group in AD

9. AD user group with combo box?

10. Add User to AD and Set NTFS Permission - ASP

11. Script for adding address info into multiple users in AD

12. adding a user DSN connection to MS SQL server 2000 using AD GPO logon scripts

 

 
Powered by phpBB® Forum Software