Jump to content
Forum²

Recommended Posts

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...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...