Naming Format for LogonName

Naming Format for LogonName

Hi All,

Until now, for the creation of the AD users, we relied on a program that was created internally, but that program is now quite old and does not fulfill our current requirements. The main reasons are that the old application requires the user to be domain admin to create AD users and there is still a lot to do after that user is created (creation of exchange account, ...). We have bought this product quite recently and now, we are trying to configure the template according to our needs and I'm now facing the first difficulty : the logon name.

In my company, we have a rules that can be split up in two parts : if the last name contains particles or not.
If not, the rule is quite simple, it's the 6 first characters of the last name followed by the 2 first characters of the first name, if the last name is shorter than 6 characters, we'll use more characters on the first name to get always 8 characters in total. per example, John Wellington would have the logon name "wellinjo". This is possible to do with the current system and has been done.

However, the thing becomes more complex when the name contains particles, because there, we only take the first character of the particles, then the remaining characters are taken from the last part, still to reach 6 characters from the last name and 2 for the first name. It means that "John Van Der Steene" would have, as logon name, "vdsteejo".
If we divide that, we can say that, if spaces are found in the last name, we take the first character of each group of letter, except the last one where we'll take 6 minus the number of particles found before, the 2 first characters of the first name are still taken of course.
This is something I couldn't, unfortunately, bring myself to achieve. 

Can you please help me ?

Thank you in advance,
Kevin

                New to ADSelfService Plus?