azstbzimms
asked on
Logon Script that writes to User's Active Directory Account in the description field not working for all users.
We have a logon script that is applied through a GPO that is supposed to take a user's logon name and the computer name that they logged on to and place that in the description field of the General Tab in each users AD account. It does the same thing for the Computer Object (Description Field). The problem that we are having is that the GPO is linked to an OU and only some of the users (in the same OU or container) are getting the description field updated when they logon. The security filtering is set to authenticated users.
Any ideas?
Any ideas?
''POPULATES AD WITH USER LOGON INFO IN DESCRIPTION FIELD
Set objSysInfo = CreateObject("ADSystemInfo")
Set objUser = GetObject("LDAP://" & objSysInfo.UserName)
Set objComputer = GetObject("LDAP://" & objSysInfo.ComputerName)
strMessage = objUser.CN & " logged on to " & objComputer.CN & " " & Now & "."
objUser.Description = strMessage
objUser.SetInfo
objComputer.Description = strMessage
objComputer.SetInfo
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Agreed... if you can set it up that way it would be better. I would not be concerned too much with users changing each others description though. I don't image there are many with ADUC on their systems or would even know what to do with it even if they did.
That and the description gets overwritten every time someone gets logged in.
That and the description gets overwritten every time someone gets logged in.
ASKER
Ok, let me see if I can find the correct delagation option to make this happen and test it.
ASKER
Thanks for your assistance!
ASKER