Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Set this script to run on user logon/logoff.
- #This script will:
- #Update the Computer Description with which user last logged in/out.
- #Update the User Description with which computer they last logged into/out of.
- Set objSysInfo = CreateObject("ADSystemInfo")
- Set objUser = GetObject("LDAP://" & objSysInfo.UserName)
- Set objComputer = GetObject("LDAP://" & objSysInfo.ComputerName)
- strMessage = objUser.CN & " logged in at " & objComputer.CN & " " & Now & "."
- 'objUser.Description = strMessage
- 'objUser.SetInfo
- objComputer.Description = strMessage
- objComputer.SetInfo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement