Acabei de escrever o seguinte VBScript e defini-lo para ser executado no logon no GPO
' Display an input dialog asking the reason for a login and writes it to the event viewer with information of the user.
Const EVENT_TYPE = "Information" 'Available Values: Success, Error, Warning, Information
Const EVENT_SOURCE = "LoginAudit" 'Setting the event source requires that the script runs with administrative privileges
firstname = GetUserFirstname()
username = GetUsername()
loginReason = ""
Do While (loginReason = "")
loginReason = InputBox("Hi " + firstname + ", please describe the reason of your login:", "Login Audit")
Loop
eventDescription = "User '" & username & "' logged in, providing the following reason: " & Chr(13) & Chr(13) & loginReason
Set WshShell = WScript.CreateObject("WScript.Shell")
strCommand = "eventcreate /T " & EVENT_TYPE & " /ID 100 /L Application /SO LoginAudit /D " & _
Chr(34) & eventDescription & Chr(34)
WshShell.Run strcommand
Function GetUserFirstname()
Set objSysInfo = CreateObject("ADSystemInfo")
Set objCurrentUser = GetObject("LDAP://" & objSysInfo.UserName)
GetUserFirstname = objCurrentUser.givenName
End Function
Function GetUsername()
Set objNetwork = CreateObject("Wscript.Network")
GetUsername = objNetwork.UserName
End Function