Really stumped here and I'm sure the answer is simple. Simply put, I'm creating a bunch of AD accounts based on input from a spreadsheet. I've been able to concatenate the fields into a DSADD command that I run each time a new user is onboarded. For example:
@echo off
dsadd user "CN=Bilbo Baggins,ou=Hobbiton,ou=Shire,ou=MiddleEarth,dc=lotr,dc=com" -fn Bilbo -ln Baggins -display "Bilbo Baggins" -upn bbaggins@lotr.com -pwd damnring! -email bbaggins@lotr.com -samid bbagins -mustchpwd no -disabled no
When I paste that into a cmd line and hit enter all is well, the AD account is created. I have hundreds of these - so I thought I would get fancy and put each of these commands on their own line and call it, oh, I don't know "add_all_users.bat". However when I call that from a command line or PS instance it errors out with "The syntax is incorrect".
What am I missing here?