Auditing Logins on a 2012 Server

Here is the question from my customer:

Is there any way of finding out when (day & time) someone signs onto the system and signs out whether they are in the office or log in remotely?  If so, is that something  you can run and send to me?

They are on a Server 2012 Essentials Server. Either Windows 7 or Windows 10 Professional workstations
LVL 15
LockDown32OwnerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

timgreen7077Exchange EngineerCommented:
You can use the Security Event logs on the server to see who and when someone logged into the server. See below for assistance with this:

https://mizitechinfo.wordpress.com/2014/06/30/domain-log-on-auditing-in-windows-server-2012-r2/
0
LockDown32OwnerAuthor Commented:
Thanks Tim. This is going to be something that it looks like this user is going to want to do on a ongoing basis and she isn't that computer savvy. Is there a third party package that might make it easier for her?
0
timgreen7077Exchange EngineerCommented:
Yes there is 3rd software you can purchase for this also. the below link is just 1 of 100s of 3rd party apps

https://www.netwrix.com/windows_server_auditing.html


If you go to google and just type "windows server auditing software" it will give you a ton of options for using 3rd party software for this.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
DonNetwork AdministratorCommented:
I keep it simple by me and use login/logoff scripts. The logon creates 2 files. one that continuously updates and the other that gets deleted daily. The logoff script compresses the file so that they turn blue and I can readily see whether they are logged in or not.
@echo off
compact /u \\server1\logs$\%username%.txt
echo %computername%    %Time:~0,5%>>\\server1\logs$\%username%.txt
set loc=
set GW=
:netstat -an |find "3389" |find /I "established" >C:\Result1.txt
:For /F "tokens=3 delims= " %%A IN (C:\Result1.txt) DO SET loc=%%A
:if (%loc%)==() set loc=console



REM you could use this next routine to determine the subnet by grabbing the default gateway


for /f "tokens=2 delims=:" %%a in ('ipconfig ^| find "Gateway"') DO SET GW=%%a
if %GW%== 10.63.106.2 set GW=Brazil    
if %GW%== 10.63.106.130 set GW=London
if %GW%== 10.63.106.162 set GW=China
if %GW%== 10.63.106.194 set GW=Somalia
if %GW%== 10.63.106.226 set GW=Hongkong
if %GW%== 10.63.107.2 set GW=Argentina  
if %GW%== 10.63.107.34 set GW=Biloxi
if %GW%== 10.63.107.66 set GW=Oklahoma
if %GW%== 10.63.107.98 set GW=Scandinavia
if %GW%== 10.63.107.130 set GW=Wyoming
if %GW%== 10.63.107.162 set GW=Montana
   

REM this grabs the computer ip address


for /f "Tokens=2 Delims=[]" %%i in ('ping -n 1 "%computername%"') do set IP=%%i

echo %username%,,%computername%,,%IP%,,%GW%,,%sessionname%,,%Date:~0,16%,,%Time:~0,5%,,"logged on",,%logonserver% >>\\server1\logs$\logins.csv 

Open in new window


@echo off
compact /c \\server1\logs$\%username%.txt
echo %username%,,%computername%,,%date%,, %time%,,logged off>>\\server1\logs$\logoffs.csv
echo %computername%    %Time:~0,5%,,logged off>>\\server1\logs$\%username%.txt

ENDLOCAL

Open in new window

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Office

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.