Results 1 to 9 of 9

Thread: Active directory question

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2005
    Location
    Ohio, USA
    Posts
    140

    Active directory question

    What is the best way to create several users all at one time. I can't imagine having to add several dozen users just by the AD users and computers snap in.

  2. #2
    Fanatic Member -TPM-'s Avatar
    Join Date
    Jul 2005
    Posts
    850

    Re: Active directory question

    You can add users via the command prompt and a batch file. That what I did when I work for a school which had hundreds of new students every year... If you want I can dig up the commands.
    TPM

    Add yourself to the VBForums Frappr Map!!

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jun 2005
    Location
    Ohio, USA
    Posts
    140

    Re: Active directory question

    I would like the commands. Thanks!!

  4. #4
    Fanatic Member -TPM-'s Avatar
    Join Date
    Jul 2005
    Posts
    850

    Re: Active directory question

    I found this which is probably your easiest option:
    http://support.microsoft.com/?kbid=199878
    TPM

    Add yourself to the VBForums Frappr Map!!

  5. #5
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Active directory question

    To create a user using ADSI...
    VB Code:
    1. Set DomainObj = GetObject("WinNT://Domain")
    2. Set UserObj = DomainObj.Create("user", "vb-guru")
    3. UserObj.SetInfo
    4. Set UserObj = Nothing
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  6. #6
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Active directory question

    Quote Originally Posted by -TPM-
    You can add users via the command prompt and a batch file. That what I did when I work for a school which had hundreds of new students every year... If you want I can dig up the commands.
    Did you have any problems with permissions when executing those commands from DOS? Got any example code?

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Jun 2005
    Location
    Ohio, USA
    Posts
    140

    Re: Active directory question

    I tried the solution that TPM suggested (the MS link) and it said it couldn't find a PDC to handle my request. I was on the Primary Domain controller when I tried it too.

  8. #8
    Fanatic Member -TPM-'s Avatar
    Join Date
    Jul 2005
    Posts
    850

    Re: Active directory question

    Hmm it was a long time ago I did it (like 6 years) I don't rememer there being any problems with setting security. Digging around I found a referance to csvde in windows help, it says it's for importing csv files into active directory so that may work... I'll keep digging and try to find the command I used.
    TPM

    Add yourself to the VBForums Frappr Map!!

  9. #9
    Fanatic Member -TPM-'s Avatar
    Join Date
    Jul 2005
    Posts
    850

    Re: Active directory question

    Ok you should be able to use : net user [username] [password] /add [domain]
    I think that's what i used...
    TPM

    Add yourself to the VBForums Frappr Map!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width