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
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