Jump to content

Featured Replies

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...