Dsadd Script

Zeepblok

New member
Joined
Nov 13, 2010
Messages
2
Location
my chair
Hi,

I made the following script in win 2k8 enterprise edition

@echo off
cls
echo Creating Accounts
echo ------------------
for /f "tokens=1-2" %%A in (users.txt) do (dsadd user "CN=%%A,CN=users,DC=contoso,DC=com" -pwd Welkom01 -mustchpwd yes -disabled yes)
echo ==================
pause



but for some reason its just looping the "echo Creating Accounts echo ------------------" bit. If I replace the dsadd bit by echo test it works normally. so the mistake must be in the DSADD bit. but I cant seem to find it. please help.

the txt file looks like this:
Wim Teunisen
Jelle Klomp
Jan Muller
 
Back
Top