|
![](/i/fill.gif) |
Invisible wrote:
> set trans = CreateObject("NameTranslate")
> trans.Init 3, ""
> trans.Set 3, "domain\user"
> set name = trans.Get(1)
> WScript.Echo name
>
> Only trouble is... it doesn't work.
Oh my god.
Apparently you have to delete the word "set" on line 4. And then it
works perfectly. WTF?
2 hours to figure that out. Fantastic. >_<
It turns out that the DN is the user's real name, followed by the names
of all the millions of OUs that the object is in, followed by the domain
name. So my user account's DN is something like
CN=Andrew, OU=Information Technology, OU=Departments, OU=Regular
Users, OU=UK, OU=Sites, OU=Managed, DC=foo, DC=com
I much prefer referring to my user account by username. It's only 8
characters. :-P
Still, at least fetching the email address worked without a hitch. And
that was shortly followed by me obtaining the data I actually wanted:
the date of the last password change. (WHY is this not in the GUI in the
first place??)
Post a reply to this message
|
![](/i/fill.gif) |