If you want to create a large amount of test user accounts in your domain, you can use the following command to quickly add all the user accounts! This will save you a lot of time….
FOR /L %i in (1,1,100) DO dsadd user “cn=User%i,ou=Gebruikers,dc=exchange,dc=local” -samid User%i -upn User%i@Exchange.local -fn User%i -display User%i -pwd P@sswOrd -disabled no
Posted in Active Directory | No Comments »
Today I was testing some things in my Exchange 2007 environment. For this test I’ve to create 100 new users in Active Directory. So I’ve created a little script that made all the new users for me.
In this script I use the command line tool dsadd.
dsadd user “CN=Testuser01,OU=Gebruikers,DC=testlab,DC=local” -upn testuser01@testlab.local -fn testuser01 -pwd P@$$W@rd
dsadd user “CN=Testuser02,OU=Gebruikers,DC=testlab,DC=local” -upn testuser02@testlab.local -fn testuser02 -pwd P@$$W@rd
dsadd user “CN=Testuser03,OU=Gebruikers,DC=testlab,DC=local” -upn testuser03@testlab.local -fn testuser03 -pwd P@$$W@rd
dsadd user “CN=Testuser04,OU=Gebruikers,DC=testlab,DC=local” -upn testuser04@testlab.local -fn testuser04 -pwd P@$$W@rd
dsadd user “CN=Testuser05,OU=Gebruikers,DC=testlab,DC=local” -upn testuser05@testlab.local -fn testuser05 -pwd P@$$W@rd
Posted in Active Directory | No Comments »
With the following script you can yoin a workstation to a domain. Copy the script into notepad and save it as an batchfile.
@echo off
C:
cd \Temp\Tools
netdom.exe JOIN %COMPUTERNAME% /Domain:corp.local
/UserD:WSimport /PasswordD:*** /OU:”OU=Workstations,DC=corp,DC=local”
Make sure the user you use in the script has administrative rights, so this user can join the workstations into de domain corp.local.
Posted in Active Directory | No Comments »