I would like to create a script that would add an AD account, but check for duplicates first.
Lets just say
$first = John
$last = Doe
The naming convention is “DoeJ”
If “DoeJ” already exists (example: Jane Doe), then it should be last name, first 2 characters of first name.. example: “DoeJo”. If “DoeJo” already exists, then last name, first 3 characters of first name, and so on…
How can I accomplish this?
I am looking for Sript examples, as I am new to Perl.
I just wanted to hack a bit before going to sleep. I’m sorry, I’m to lazy to explain anything right now, but I’m sure you will find pretty much, when looking for anything special on perldoc.
@Everybody: Feel free to comment, modify, extend, beautify, whatever this code if you feel like that.