I have what ought to be a pretty simple trap. It either worked (0), or didn't (any non-zero).
But I'm seeing users on my incoming list with invalid names (smith, Jr.) that should and do fail to create. But when they fail to create, they also fail to set err.number at something else than 0, and my logging process logs them as good, created users.
Does anyone see something I'm overlooking?
But I'm seeing users on my incoming list with invalid names (smith, Jr.) that should and do fail to create. But when they fail to create, they also fail to set err.number at something else than 0, and my logging process logs them as good, created users.
Code:
err.clear
Set objUser = objOU.Create("User", "cn=" & strCommon & "")
If err.number = 0 then
objFileRpt.writeline "Created user account UID=" & strUID & " cn=" & strCommon & " " & err.description
Does anyone see something I'm overlooking?