Results 1 to 9 of 9

Thread: Sample Script for DSADD for Bulk Users

  1. #1
    Debra Brown Guest

    Sample Script for DSADD for Bulk Users

    Do you have a sample script for DSADD User? I want to add users to Active
    Directory running Windows 2003. I want to add the following attributes
    First Name, Last Name, Logon Name, setup a password, users need to change
    password after logging in the first time, assign users in a certain groups,
    etc. Please let me know if you have any questions or need additional
    information.

    Thanks.


  2. #2
    Marcin Guest

    Re: Sample Script for DSADD for Bulk Users

    Debra,
    here is a sample:
    dsadd user "cn=Larry,ou=Accounts,dc=mcl,dc=com" -fn Larry -ln Fine -pwd
    Soup2Nuts -memberof "cn=ThreeStooges,ou=Groups,dc=mcl,dc=com" -mustchpwd yes
    You can find more info regarding syntax at
    http://technet.microsoft.com/en-us/l.../cc731279.aspx - or simply type in
    dsadd user /?

    hth
    Marcin

    "Debra Brown" <debrabrown@mail.com> wrote in message
    news:ukmQZiYKJHA.5920@TK2MSFTNGP03.phx.gbl...
    > Do you have a sample script for DSADD User? I want to add users to Active
    > Directory running Windows 2003. I want to add the following attributes
    > First Name, Last Name, Logon Name, setup a password, users need to change
    > password after logging in the first time, assign users in a certain
    > groups, etc. Please let me know if you have any questions or need
    > additional information.
    >
    > Thanks.




  3. #3
    Paul Bergson [MVP-DS] Guest

    Re: Sample Script for DSADD for Bulk Users

    Consider using csvde, you can build a spreadsheet of names and import via
    csv.

    For great details read the following web pages
    http://www.computerperformance.co.uk...VDE_LDIFDE.htm

    Make sure to the follow the several pages of info

    --
    Paul Bergson
    MVP - Directory Services
    MCTS, MCT, MCSE, MCSA, Security+, BS CSci
    2008, 2003, 2000 (Early Achiever), NT4

    http://www.pbbergs.com

    Please no e-mails, any questions should be posted in the NewsGroup
    This posting is provided "AS IS" with no warranties, and confers no rights.

    "Debra Brown" <debrabrown@mail.com> wrote in message
    news:ukmQZiYKJHA.5920@TK2MSFTNGP03.phx.gbl...
    > Do you have a sample script for DSADD User? I want to add users to Active
    > Directory running Windows 2003. I want to add the following attributes
    > First Name, Last Name, Logon Name, setup a password, users need to change
    > password after logging in the first time, assign users in a certain
    > groups, etc. Please let me know if you have any questions or need
    > additional information.
    >
    > Thanks.




  4. #4
    Debra Brown Guest

    Re: Sample Script for DSADD for Bulk Users

    Marcin,

    Thanks for your prompt response. Is it possible to enter a batch file with
    a list of users and attributes and use DSADD to import it to Active
    Directory?

    Thanks.

    "Marcin" <marcin@community.nospam> wrote in message
    news:%23K7e%23uZKJHA.5460@TK2MSFTNGP03.phx.gbl...
    > Debra,
    > here is a sample:
    > dsadd user "cn=Larry,ou=Accounts,dc=mcl,dc=com" -fn Larry -ln Fine -pwd
    > Soup2Nuts -memberof "cn=ThreeStooges,ou=Groups,dc=mcl,dc=com" -mustchpwd
    > yes
    > You can find more info regarding syntax at
    > http://technet.microsoft.com/en-us/l.../cc731279.aspx - or simply type
    > in dsadd user /?
    >
    > hth
    > Marcin
    >
    > "Debra Brown" <debrabrown@mail.com> wrote in message
    > news:ukmQZiYKJHA.5920@TK2MSFTNGP03.phx.gbl...
    >> Do you have a sample script for DSADD User? I want to add users to
    >> Active Directory running Windows 2003. I want to add the following
    >> attributes First Name, Last Name, Logon Name, setup a password, users
    >> need to change password after logging in the first time, assign users in
    >> a certain groups, etc. Please let me know if you have any questions or
    >> need additional information.
    >>
    >> Thanks.

    >
    >



  5. #5
    Debra Brown Guest

    Re: Sample Script for DSADD for Bulk Users

    Thanks.

    "Paul Bergson [MVP-DS]" <pbergson@allete_nospam.com> wrote in message
    news:%23oUbglgKJHA.5532@TK2MSFTNGP02.phx.gbl...
    > Consider using csvde, you can build a spreadsheet of names and import via
    > csv.
    >
    > For great details read the following web pages
    > http://www.computerperformance.co.uk...VDE_LDIFDE.htm
    >
    > Make sure to the follow the several pages of info
    >
    > --
    > Paul Bergson
    > MVP - Directory Services
    > MCTS, MCT, MCSE, MCSA, Security+, BS CSci
    > 2008, 2003, 2000 (Early Achiever), NT4
    >
    > http://www.pbbergs.com
    >
    > Please no e-mails, any questions should be posted in the NewsGroup
    > This posting is provided "AS IS" with no warranties, and confers no
    > rights.
    >
    > "Debra Brown" <debrabrown@mail.com> wrote in message
    > news:ukmQZiYKJHA.5920@TK2MSFTNGP03.phx.gbl...
    >> Do you have a sample script for DSADD User? I want to add users to
    >> Active Directory running Windows 2003. I want to add the following
    >> attributes First Name, Last Name, Logon Name, setup a password, users
    >> need to change password after logging in the first time, assign users in
    >> a certain groups, etc. Please let me know if you have any questions or
    >> need additional information.
    >>
    >> Thanks.

    >
    >



  6. #6
    Paul Bergson [MVP-DS] Guest

    Re: Sample Script for DSADD for Bulk Users

    csvde will do this for you

    --
    Paul Bergson
    MVP - Directory Services
    MCTS, MCT, MCSE, MCSA, Security+, BS CSci
    2008, 2003, 2000 (Early Achiever), NT4

    http://www.pbbergs.com

    Please no e-mails, any questions should be posted in the NewsGroup
    This posting is provided "AS IS" with no warranties, and confers no rights.

    "Debra Brown" <debrabrown@mail.com> wrote in message
    news:ui22erhKJHA.3080@TK2MSFTNGP06.phx.gbl...
    > Marcin,
    >
    > Thanks for your prompt response. Is it possible to enter a batch file
    > with a list of users and attributes and use DSADD to import it to Active
    > Directory?
    >
    > Thanks.
    >
    > "Marcin" <marcin@community.nospam> wrote in message
    > news:%23K7e%23uZKJHA.5460@TK2MSFTNGP03.phx.gbl...
    >> Debra,
    >> here is a sample:
    >> dsadd user "cn=Larry,ou=Accounts,dc=mcl,dc=com" -fn Larry -ln Fine -pwd
    >> Soup2Nuts -memberof "cn=ThreeStooges,ou=Groups,dc=mcl,dc=com" -mustchpwd
    >> yes
    >> You can find more info regarding syntax at
    >> http://technet.microsoft.com/en-us/l.../cc731279.aspx - or simply type
    >> in dsadd user /?
    >>
    >> hth
    >> Marcin
    >>
    >> "Debra Brown" <debrabrown@mail.com> wrote in message
    >> news:ukmQZiYKJHA.5920@TK2MSFTNGP03.phx.gbl...
    >>> Do you have a sample script for DSADD User? I want to add users to
    >>> Active Directory running Windows 2003. I want to add the following
    >>> attributes First Name, Last Name, Logon Name, setup a password, users
    >>> need to change password after logging in the first time, assign users in
    >>> a certain groups, etc. Please let me know if you have any questions or
    >>> need additional information.
    >>>
    >>> Thanks.

    >>
    >>

    >




  7. #7
    jmedd Guest

    Re: Sample Script for DSADD for Bulk Users

    If you are able to install 3rd party software then using Powershell and the
    free Quest AD cmdlets
    (http://www.quest.com/powershell/activeroles-server.aspx) you can very simply
    achieve what you are trying to do.

    If you have a csv with the list of new users and their attributes, say
    something like:

    Name,samAccountName,Office etc
    "Fred Bloggs",fbloggs,London
    "John Doe",jdoe,Paris

    then you can create new accounts for every entry in the csv file bu typing
    the below into Powershell.

    Import-CSV list.csv | New-QADUser - parentcontainer domain.com/OUname -import


    If you need more advanced options I can expand this further

    "Paul Bergson [MVP-DS]" wrote:

    > csvde will do this for you
    >
    > --
    > Paul Bergson
    > MVP - Directory Services
    > MCTS, MCT, MCSE, MCSA, Security+, BS CSci
    > 2008, 2003, 2000 (Early Achiever), NT4
    >
    > http://www.pbbergs.com
    >
    > Please no e-mails, any questions should be posted in the NewsGroup
    > This posting is provided "AS IS" with no warranties, and confers no rights.
    >
    > "Debra Brown" <debrabrown@mail.com> wrote in message
    > news:ui22erhKJHA.3080@TK2MSFTNGP06.phx.gbl...
    > > Marcin,
    > >
    > > Thanks for your prompt response. Is it possible to enter a batch file
    > > with a list of users and attributes and use DSADD to import it to Active
    > > Directory?
    > >
    > > Thanks.
    > >
    > > "Marcin" <marcin@community.nospam> wrote in message
    > > news:%23K7e%23uZKJHA.5460@TK2MSFTNGP03.phx.gbl...
    > >> Debra,
    > >> here is a sample:
    > >> dsadd user "cn=Larry,ou=Accounts,dc=mcl,dc=com" -fn Larry -ln Fine -pwd
    > >> Soup2Nuts -memberof "cn=ThreeStooges,ou=Groups,dc=mcl,dc=com" -mustchpwd
    > >> yes
    > >> You can find more info regarding syntax at
    > >> http://technet.microsoft.com/en-us/l.../cc731279.aspx - or simply type
    > >> in dsadd user /?
    > >>
    > >> hth
    > >> Marcin
    > >>
    > >> "Debra Brown" <debrabrown@mail.com> wrote in message
    > >> news:ukmQZiYKJHA.5920@TK2MSFTNGP03.phx.gbl...
    > >>> Do you have a sample script for DSADD User? I want to add users to
    > >>> Active Directory running Windows 2003. I want to add the following
    > >>> attributes First Name, Last Name, Logon Name, setup a password, users
    > >>> need to change password after logging in the first time, assign users in
    > >>> a certain groups, etc. Please let me know if you have any questions or
    > >>> need additional information.
    > >>>
    > >>> Thanks.
    > >>
    > >>

    > >

    >
    >
    >


  8. #8
    Join Date
    Aug 2011
    Posts
    423

    Re: Sample Script for DSADD for Bulk Users

    Here is a sample of Dsadd user script that you can create to add users in active directory. I found a video no youtube which showed up the process of doing this. The initial syntax that is used in this is -
    Code:
    dsadd user <UserDN> [-samid <SAMName>] [-upn <UPN>] [-fn <FirstName>] [-mi <Initial>] [-ln <LastName>] [-display <DisplayName>] [-empid <EmployeeID>] [-pwd {<Password> | *}] [-desc <Description>] [-memberof <Group> ...] [-office <Office>] [-tel <PhoneNumber>] [-email <Email>] [-hometel <HomePhoneNumber>] [-pager <PagerNumber>] [-mobile <CellPhoneNumber>] [-fax <FaxNumber>] [-iptel <IPPhoneNumber>] [-webpg <WebPage>] [-title <Title>] [-dept <Department>] [-company <Company>] [-mgr <Manager>] [-hmdir <HomeDirectory>] [-hmdrv <DriveLetter>:][-profile <ProfilePath>] [-loscr <ScriptPath>] [-mustchpwd {yes | no}] [-canchpwd {yes | no}] [-reversiblepwd {yes | no}] [-pwdneverexpires {yes | no}] [-acctexpires <NumberOfDays>] [-disabled {yes | no}] [{-s <Server> | -d <Domain>}] [-u <UserName>] [-p {<Password> | *}] [-q] [{-uc | -uco | -uci}]. 
    Read the syntax carefuly and fill up the required places. You can also use a txt which consist of users seperate in comma three per row. Then add the reference of txf file in dsadd script and done.
    http://technet.microsoft.com/en-us/l.../cc731279.aspx

  9. #9
    Join Date
    Jul 2011
    Posts
    236

    Re: Sample Script for DSADD for Bulk Users

    Refer to youtube. There are number of scripts that are showed with sample process how to run them. That will be much better. I found a video which showed to create user via dsadd user. The script was simple. What you have to ensure that format of adding up user account and then providing the reference in sysntax properly or else you will end up a error. It cannot be explained properly unless you watch a video which shows how this all works actually.

Similar Threads

  1. How to create several users via script
    By Halyn in forum Networking & Security
    Replies: 6
    Last Post: 29-11-2009, 06:36 PM
  2. Sample database script to create tables
    By Naresh Modi in forum Software Development
    Replies: 3
    Last Post: 12-08-2009, 02:17 PM
  3. Batch script to move users to different OUs
    By Serrix in forum Active Directory
    Replies: 5
    Last Post: 23-12-2008, 05:45 PM
  4. DSAdd Users Multiple Users
    By hindustnidude in forum Active Directory
    Replies: 6
    Last Post: 18-11-2008, 04:28 PM
  5. Add users to Group via Script - [WP]
    By ABRIELLE in forum Active Directory
    Replies: 4
    Last Post: 29-01-2008, 06:54 PM

Posting Permissions

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