Well I was only aware of one particular way to modify the displayname in the Active Directory, and then this only worked for New users.
How to change display names of Active Directory usershttp://support.microsoft.com/kb/250455/
Well a colleague of mine pointed me in the direction of some really useful utilities which make this a whole lot easer. Check em out !
Current version of ADModify .NET can be found here:
This task can be also accomplished with other tools like adfind and admod from www.joeware.net. Quick tutorial here:
This example shows user rename but in the same way (passing results) You can modify displayName.
I thank Tomasz Onyszko of Microsoft for these great pointers.
I run a little blog on <a href="http://free-activedir-tools.blogspot.com">Free Active Directory Reporting Tools</a> and many of them can actually be used to modify AD data as well.
If you're ever looking for helpful and FREE AD tools, please feel free to stop by!
I am trying to modify details in active directory but only Given name, Display name and surname I am able to change.
Now I want to change designation and center also but not able to change using the below code. Please help
PrincipalContext oPrincipalContext = GetPrincipalContext(sDomainName, sServiceUserName, sServicePassword);
UserPrincipal oUserPrincipal = UserPrincipal.FindByIdentity(oPrincipalContext, sUserName);
oUserPrincipal.DisplayName = "1";
oUserPrincipal.GivenName = "2";
oUserPrincipal.Surname = "3";
oUserPrincipal.Description = "4";