PS Script to Create AD User Accounts from CSV File

Hello goodevening (or good afternoon in the USA),

I’m trying to make your PS script (to create AD User Accounts from a CSV file) work in my labenvironment, but I keep getting errors on line 13. I can’t figure out where it goes wrong

Can someone help me?

Greetingz, Johan

1 Like

I have the same error on line 13, I have tried to trouble shoot but to no avail

1 Like

@Johan and @ferdinand.tubuo this is most likely because your OU path is incorrect. If it contains the wrong domain name it won’t work.

Hey Paul,

I’ve changed the OU path in the CSV-file, but I still got the same errors. I’ve included all of the errors.

1 2 3 4 5

The first error also says something about the ‘ToBooLean’ command. I did exactly the same as you.

Greetings, Johan

1 Like

So let’s take a look at your OU path in your script, then in Active Directory, show me your OUs distinguished name.

o m g…

while I was looking in my labenvironment for the answer I found out I did something very stupid. I was pointing to another CSV-file I made, with - indeed - the wrong OU-path to the domain of Instructorpaul.

Thanks

1 Like

Glad you got it working! Don’t worry this will be the norm for most problems you encounter while scripting. Great job figuring it out!