Can I Create a Script to Log User Activities Like Logins and Idle Time?

0
13
Asked By CuriousCat88 On

I'm looking for help on creating a script that can log specific user actions such as when they log in, log out, lock their screen, unlock it, and track idle time (for instance, if they are idle for over 30 minutes). Our management insists on avoiding conventional timekeeping software, which they say is too much of a hassle for users. It's important for us to have some kind of log file that we can reference if a user claims they worked overtime. We want to avoid any invasive monitoring software; just a simple solution that tracks these events would be ideal. Is this achievable with PowerShell?

4 Answers

Answered By CleverMouse On

Honestly, this sounds like a recipe for discontent among your team. If management wants to track people, they should consider proper time tracking tools that don't come across as overly invasive, like employee monitoring software that tracks billable hours without hovering over workers constantly. There are options that respect privacy but still provide accountability.

Answered By TechGuru99 On

It's totally feasible to log these events, but you should think about how you'll ensure the accuracy and integrity of the logs. Keeping everything local means less complexity, but it also opens you up to potential tampering. If a user's hard drive crashes or data gets lost, it's gonna be hard to verify any disputes about hours worked.

Answered By RandomThoughts22 On

You might want to check out alternatives like ConnectWise or ScreenConnect—they offer features that align with what you're looking for, including logging activity without recording screens. Just be cautious about using such software, as the balance between monitoring and employee trust can be thin.

CuriousCat88 -

Maybe we should present these alternatives to management? It could save us a lot of hassle.

Answered By WiseOwl77 On

Using PowerShell, you can definitely track events like logon and logoff by monitoring the event viewer. However, to keep track of idle time, you'll likely need a custom solution. One possibility is to check the user’s session ID with user32.dll to see how long it's been since they last interacted with their computer. It sounds complicated, but a skilled developer could make it work for you.

QuestionCreator -

I get that it's possible, but why does it seem like such a hassle to implement?

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.