Link to home
Start Free TrialLog in
Avatar of tdiamond
tdiamond

asked on

Login script question

I would like to set an environment variable on each user's machine when they log in.  The environment variable should be set to be equal to the user's "Telephone number:" field that exists in their user account in Active Directory (AD).  I will be implementing the code using an AD Group Policy.  Is it possible to do this easily using a batch file of some sort, or will I need to use VBScript or something to perform an LDAP query (someone mentioned that the latter might be needed)?  In Netware it was as easy as saying SET TIA = "%TELEPHONE_NUMBER" in the user's login script.  Please include an example if you think you have the answer.
ASKER CERTIFIED SOLUTION
Avatar of Mirfster
Mirfster
Flag of United States of America 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 dominion4thade
dominion4thade

Not to plug software but there is a program I use called ScriptLogic that allows you to do this every easily.  They offer a fully functionaly trail version that will accomidate all windows clients, if you have a restricted budget.  I've been using it for a year and it has intergrated with my AD domain very well.  Just wanted to share what tools I have found usefull