Hello,
I have a script which lets me actively monitor logoffs (the important
portion is attached below). It works fine but I'm only interested in
knowing about when a human logged off... I don't need to know about
accounts with a "$" in them or system accounts. Is there any way I can
filter or use a logical operator to prevent getting notified about
them?
Thanks!
==========
Set objWMIServices =
GetObject("WinMgmts:{impersonationLevel=impersonate,
(Security)}\\.\root\cimv2")
Set LoggedEvents = objWMIServices.ExecNotificationQuery ("Select * from
__instancecreationevent where TargetInstance isa 'Win32_NTLogEvent'")
set wshShell = WScript.createobject("wscript.shell")
Do
Set objLatestEvent = LoggedEvents.NextEvent
intEventID = objLatestEvent.TargetInstance.EventCode
Select Case intEventID
Case 538
wshShell.Run "net send 10.16.0.10 User logged off"
End Select
Loop