I use Windows Server 2008 at my workstation and sometimes work from home. Is there an easy way of viewing the login and logoff times from the event viewer so I can see how many hours I was logged in or simply to find out when I started working? Preferably another application with an easier interface than manually looking at the event viewer, which is cluttered even after filtering out other unrelated events.
Here is a nice explanation for making quite powerful filters: http://blogs.technet.com/b/askds/archive/2011/09/26/advanced-xml-filtering-in-the-windows-event-viewer.aspx You can afterwards export the data to excel and work with it.
Answer for a domain environment.
Install additional account info dll on your dc. http://www.windowsitpro.com/article/tips/jsi-tip-8045-how-can-i-add-an-additional-account-info-tab-to-the-user-properties-of-active-directory-users-and-computers-.aspx
Very easy to view the info there, but remember account logon info is specific to each DC so make sure to query each of them.
Eventually you could write the info in one log so that you see the logon/logoff time in the same file. When you logoff you could also extend the powershell script read the log file, search for your last login time, parsing the time and measuring the difference and write it also to the log.