At my work we use Windows. I want to track my logins and logouts, to for example create a time report.
This is what I have googled and guessed so far, by inspecting the event log.
Get-EventLog security | `
Where-Object {$_.TimeGenerated -gt '7/02/19 05:44'} | `
Where-Object {($_.EventId -eq 4648) -or ($_.EventId -eq 4634 -and $_.Message.Contains('Logon Type: 3')) } | `
Select-Object TimeGenerated,InstanceID,Message | `
Group TimeGenerated,InstanceID
My problem is that I get a whole lot of entries where I clearly havent been at my desk. Can I somehow distinct human login/logouts from all the magicmojo thats happening when Im not there.
It doesnt need to be reading from event log either, as long as I get what I want