Profile log in record

Page 3 of 3 FirstFirst 123

  1. Posts : 640
    Windows 7 Ultimate x64
       #21

    karlsnooks said:
    duzzy,
    why I thank you for giving me permission to post my script.
    Sorry didn't mean it like that, just thought you might not post until I got a response about mine or until he found out about having PowerShell.
      My Computer


  2. Posts : 24
    Windows 7
    Thread Starter
       #22

    Nice work. Will need time to wrap my head around this. Did the log.bat file with instant results. Wil use somewhat over the weekend and post results. Thank you. @ Karlsnooks. I am going to lay off the power shellfirst. Not because i think it wont work but because it scares me. I will give it serious go if the other file does not do it for me. But, thank you so much for the effort.
      My Computer


  3. Posts : 24
    Windows 7
    Thread Starter
       #23

    @Karlsnooks. I just could not wait. Gave powershell a go, just quick you see. Got instant results. Man that is freaky. Info is weird thought. Give me user logon times. not time. Wait I will post screenshot. Whats up with that. Am I doing it wrong. Probably. Late friday night. Time for bed. Thx
    Attached Thumbnails Attached Thumbnails Profile log in record-screenhunter_01-apr.-20-22.10.jpg  
      My Computer


  4. Posts : 10,200
    MS Windows 7 Ultimate SP1 64-bit
       #24

    I suspected that you might want more.

    What that script shows you is the last time that the user(s) logged on and the total number of times they have logged on.

    What it doesn't show is when a user logged off and the total number of hours that they were logged on.

    For some of that info, the EventViewer can be useful, however, as you have seen, the clearing of the logs will eliminate past event log entries.

    True is that with group policy you can restrict the use of EventViewer.

    I suspect that your users don't have the slightest idea what event viewer is.

    Although supposedly there is a "LogoffTime" property, the info doesn't seem to be there. Whether this is operator malfucntion or a "feature" of the netlogons is beyond my knowledge.

    I seriously recommend visiting a couple of powershell and/or admin forums to see if someone there will, for no renumeration, write a script for you.

    http://powershell.com
    http://powershellcommunity.org
    http://blogs.technet.com/heyscriptingguy

    There are many more, I just don't have a convenient set of bookmarks for PowerShell-mostly just RSS feeds
      My Computer


  5. Posts : 640
    Windows 7 Ultimate x64
       #25

    If you run my batch file it will instantly create the files under C:\Logs that you can then view. If setup through Group Policy as a logon/logoff script it will be ran each time a user logs on or off and the info will be recorded in the log file.

    One problem here is I don't know is WinXP Home has Group Policy so you might need WinXP Professional, although you might be able to use Task Scheduler.

    Karlsnooks PowerShell script can also be converted to a VBScript file if your familer with that but it accesses the WMI Object Win32_NetworkLoginProfile and under both Win7 and Virtual PC's WinXP Mode the logoff time is returned as "LastLogoff: **************.******+***" making it invalid.

    I could not find any WMI Object to return any info about logoff times. It's possible to retrieve this info from the EventViewer but I don't know how to script it to return the info you want in any scripting language but my skills are quite limited. Simply opening the EventViewer to view the info can also be a bit unappealing.

    Also my script can be converted to VBScript if you have problems with the batch file but formatting the output may be a challange.

    Like Karlsnooks said you can also ask on some scripting sites if you want to retrieve the info from Windows instead of generating it yourself.

    If you choose to use my batch script then I can help with any formatting or changes you require.
      My Computer


  6. Posts : 10,200
    MS Windows 7 Ultimate SP1 64-bit
       #26

    PowerShell is available also for XP. Simply a download away. Win 7 and Win 8 come with PowerShell.

    I can not recommend strong enough visiting some of the PowerShell sites and also admin sites. PowerShell is the preferred scripting language by admins.

    You might want to check www.petri.co.il/ for an admin site.
      My Computer


  7. Posts : 24
    Windows 7
    Thread Starter
       #27

    I am sorry. I am really busy this side. Did not give this all the attention it needs. We have a long weekend coming up, Friday, Sat, Sun, Monday, and Tuesday. Bad for business but good for the lazy... I will attend to it then.
      My Computer


 
Page 3 of 3 FirstFirst 123

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 14:42.
Find Us