Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How rename a username ?

Status
Not open for further replies.

hervebin

IS-IT--Management
Feb 21, 2002
35
FR
Hello

I would like to rename some username in a NT domain. I would like that all my account are in Lower Case.

So I write this, just for rename the account "Guest"
But I have an error: 0x8000500F, when it do the PUT !!

Have you some idea ??

Thanks



Set oDom = GetObject("WinNT://Domain/Server")
For Each obj In oDom

If obj.Class = "User" Then
Set oUser = getobject("WinNT://domain/Server/" & obj.name)

if oUser.name = "Guest" then

newname = Lcase(oUser.name)
oUser.put "name",newname
oUser.setinfo
End If

End If
Next
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top