adsi new user scripts 
Author Message
 adsi new user scripts

I'm trying to write a newuser script that reads values as defined in an
Excel spreadsheet as this easier to read and I need it to do the
following.
1. Check whether the account exists
2. Create the account in the desired OU, if possible with TS variables
3. Make the account a member of x y & z groups
4. create a mailbox in Exchange 5.5

1) I imagine pretty simple, will look into this

2) So far I have only managed to complete step 2 (without the TS part,
although at the moment I can get away with using normal profiles for
this)

3) Am struggling here, most of my groups are in an OU called groups and
the following code appears to be struggling.
ou = oXL.activecell.Value       ' of the fom OU=groups
s = "LDAP://" + ou+"," + root       ' root = DC=Avonhead,DC=school,DC=Int
set c = GetObject(s)
Set u = c.Create("user", uname)
ix=8
Do
if not oXL.activecell.offset(0,ix).Value = "" Then
 sGroup = oXL.activecell.offset(0,ix).Value
 set oGroup = GetObject(c.s & "/" & sgroup & ",group")
 oGroup.add u.s
 oGroup=Nothing
End If
ix = ix +1
Loop until oXL.activecell.offset(0,ix).Value = ""

 I get an error    'object doesn't support this property or method'

4) not sure where to start, can only think that from each line I create
a comma delimted text file and use the old fashioned import.  Would
prefer to be able to use WSH solely.

Does anyone havce any pointers for this.

TIA

Mark



Mon, 27 Jan 2003 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. ADSI ACE NEW USER NTFS problem

2. New User Script

3. Script to create new user?

4. Need Help adding new users to FTP using a script

5. Script to create new user ?

6. ADSI and VB HELP I am NEW

7. New download : ADSI Scriptomatic

8. New Scripting Clinic posted covering new WSH Beta 2 features

9. WSH ADSI -- Set user rights on NT workstations

10. Using ADSI to change NT user properties

11. Accessing user properties with ADSI

12. Win2K User Fields in ADSI

 

 
Powered by phpBB® Forum Software