[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Dr. Nick Riviera

9/27/2002 2:58:00 PM

I am having trouble finding any documented ways to programmatically
rename a user account. Can anyone point me in the right direction.

Thank you,
Rob
1 Answer

(Jason Jing)

9/30/2002 3:37:00 AM

0

Hello,

If you are in Windows 2000 domain, you can change the logon Name using code
similar to following:

Set objUser = GetObject("LDAP://cn=b,cn=users;dc=vb;dc=gtec")
objUser.Put "sAMAccountName", "bbb"
objUser.Put "displayName", "bbb"
objUser.SetInfo

The code to change displayName is optional. You may also want to change sn
or givenName property of the user, so that most properties in AD users &
computers can reflect the real identity of current user.

Jason Jing
Microsoft Support
This posting is provided "AS IS", with no warranties, and confers no rights.