The script provided works well except for the following:
I adjusted the script with:
$fullName = "$firstName $middleName $lastName"
$Context.SetModifiedPropertyValue("cn", $fullName)
Instead of "cn" I also tried "fullName", however the account is not created. In the logging I see the following (translated):
there are more values added for a property that can only have one value...
Because Full Name is a required field I've set the field value to %firstName%, the script should change the name before creation. This works well for the field User Logon Name (pre-Windows 2000) which is also a required field. I've set this field also to %firstName% in the pattern file and is changed upon creation.
Is this by design or am I missing something?
With regards,
Remco Tiel