|
| ||||||||||
| Tags: active directory, command line tool, dsadd, script, windows server |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| Sample Script for DSADD for Bulk Users
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
| |||
| |||
| 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
| |||
| |||
| 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
| |||
| |||
| 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
| |||
| |||
| 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
| |||
| |||
| 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
| |||
| |||
| 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
| |||
| |||
| 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. |
|
#9
| |||
| |||
| 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. |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Sample Script for DSADD for Bulk Users" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to create several users via script | Halyn | Networking & Security | 6 | 29-11-2009 06:36 PM |
| Sample database script to create tables | Naresh Modi | Software Development | 3 | 12-08-2009 02:17 PM |
| DSAdd Users Multiple Users | hindustnidude | Active Directory | 6 | 18-11-2008 04:28 PM |
| Logon Script failing, on some users | Donnell | Active Directory | 1 | 28-05-2008 10:53 PM |
| Add users to Group via Script - [WP] | ABRIELLE | Active Directory | 4 | 29-01-2008 06:54 PM |