get the AD username in WSH

  • Thread starter Thread starter daniel
  • Start date Start date
D

daniel

Hi

How can I get the AD Username in WSH, when it is diffrent
from sAMAccaountname ?

wshnetwork.UserName will give me the sAMAccountname.

Any idea ?


rgds Daniel
 
the attribute is userPrincipalName

if you need script examples to search a user using their sAMAccountName using
LDAP just send me an email

if you know how to get a user object using ADSI and its sAMAccountName, then
just use the userPrincipalName attribute
 
Hi Benoit

I would like to get the emailaddress phone ... from the AD
user direct into a wordtemplate.
This information I only can get over LDAP. But how can I
get the current UserPrincipalName to catch the userobj.
With wshnetwork.UserName I will get the NT Name from the
user, but with this name I can't catch the user over LDAP.

any idea ?

rgds Daniel
 
Back
Top