Link to home
Start Free TrialLog in
Avatar of ithumebuild
ithumebuild

asked on

VBS Outlook Signature script AD Details Issue

I have developed a vbs script to generate outlook signatures that runs at login just like all the others that are found on this site.

This script runs well for most users but some don't correctly have their titles and phone numbers extracted from AD ( See snippet the echo is blank ). In AD I can see that they have these details in the required fields but they are blank when the script runs. Any ideas? Could there be something wrong in AD?
Set objSysInfo = CreateObject("ADSystemInfo")
objSysInfo.RefreshSchemaCache
qQuery = "LDAP://" & objSysInfo.Username
 
Set objuser = GetObject(qQuery)  
 
FullName = objuser.displayname
EMail = objuser.mail
Company = objuser.Company
Title = objuser.title
PhoneNumber = objuser.TelephoneNumber
FaxNumber = objuser.facsimileTelephoneNumber
 
Wscipt.Echo(Title)

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of chandru_sol
chandru_sol
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ithumebuild
ithumebuild

ASKER

hi chuandu_sol,

That was the script I used as the base only making changes to it as per our layout requirements. As I mentioned in my original question my script works for most people, it is just a couple users that don't correctly have the title and phone number extracted. I have checked there details in AD and the Title and Phone Number fields are filled in and correct. The code I listed is just the snippet of my script that is causing the issues.