I am making a script that programatically creates user accounts in
Active Directory. I can create users without any problems. The issue
is I would like to append a # to the user ID if it already exists in
AD. For Example, jsmith already exists so if Joe Smith joins the
company his samAccountName should be jsmith2. I cannot get that part
of the scripting. If anyone has a code snippet related to that issue
it would be greatly appreciated. Just as a note: I cannot pull from
Excel so altering the id's there is out. I need it to all be contained
in the script.