Problem with BAT scripting (EXAM)

May 30, 2011 at 02:52:27
Specs: Windows XP
I'm currently writing a script for adding users to AD (Active Directory) thorugh a CMD window. And I'm experiencing some problems.

The 1st thing is that i can't seem to add the (") into the type of line that i need.
dsadd user "cn=
The command is very sensetive , so i kinda need the " where it belongs.
Anyone got a clue how to add this special character into the script?

2nd i need to know how to export a whole line into a txt file.
I'm currently doing it by using the >> AcitveDirectory.txt
But when I do this , everything i write is typed on a new line..

I'll try to write the script here , but I'm using ViritualBox without GuestAddon so it's a bit hard.

And please try answer fast , got a exam coming up :D

~Alexander Mitchell

dsadd user "cn=USERNAME,ou=MYCLASS,dc=DOMAIN,dc=LOCAL" -fn Firstname -ln Lastname -disabled no -pwd paassword -upn USERNAME

See More: Problem with BAT scripting (EXAM)

Report •

June 2, 2011 at 03:39:26
Not really sure what your after.
echo dsadd user "cn=USERNAME,ou=MYCLASS,dc=DOMAIN,dc=LOCAL" -fn Firstname -ln Lastname -disabled no -pwd paassword -upn USERNAME >> ActiveDirectory.txt

Report •
Related Solutions

Ask Question