'--- UserLogonLogOff.vbs
Dim o
'create the request object
Set o = CreateObject("MSXML2.ServerXMLHTTP")
'create the network object to get computer and user info
Set objNetwork = CreateObject("Wscript.Network")
'day and time format
SetLocale(1033)
parm1 = WScript.Arguments(0) '-- this argument is passed by GPO (script parameter)
mnow = now
WhenStr = WeekdayName(weekday(mnow)) & "," & Year(mnow) &"-" & Month(mnow)&"-" & Day(mnow)& "," & Hour(mnow)& ":" & Minute(mnow) & ":"& Second(mnow)
'make the request HLG used instead of GET, so you can filter out requests made by the browser
o.open "HLG", "http://192.168.0.15:8595/default.htm?"& parm1 & "," & objNetwork.UserName & "," & objNetwork.ComputerName &","& WhenStr
o.send
'cleanup
set o = Nothing
set objNetwork = Nothing
Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.
Comments (0)