to track user logon/logoff


Step 1: Create the following two files using Notepad or your favorite text editor:

——logon.cmd—-
echo logon %username% %computername% %date% %time% >> \\sbs\share\logon.log

—–logoff.cmd—–
echo logoff %username% %computername% %date% %time% >> \\sbs\share\logon.log

Step 2: Update Group Policy to run the appropriate batch file. In Group Policy, go to:
User Configuration-> Windows Settings-> Scripts (Logon/Logoff)-> Logon

Step 3: As users log on and off, your log file should look something like this:

logon June VSXP Tue 22/02/2005 10:39:51.12
logoff June VSXP Tue 22/02/2005 10:41:08.45
logon MickM VSXP Tue 22/02/2005 10:42:01.07
logoff MickM VSXP Tue 22/02/2005 10:42:46.81

https://support.microsoft.com/en-us/help/556015

Powershell method:

http://www.alexcomputerbubble.com/logon-script-is-here-to-stay/

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: