/build/static/layout/Breadcrumb_cap_w.png

Custom Inventory Rule: User Login History

Can someone help me with creating a custom inventory rule to create a user login history?  This has been requested to see how often certain computers are being used.  I've heard that this can be done from being in the KKE Open Forums, but it was never demonstrated.

Please and thank you!



0 Comments   [ + ] Show comments

Answers (1)

Posted by: SMal.tmcc 5 years ago
Red Belt
0

You can use a script to push a batch file to machines if you only want to track a couple

Place the batch file someplace the CIR can find it.  ( if you want to do this domain wide or for a large domain group put the line in the domain or group login script instead of a batch file)

I use C:\ProgramData\Quest\KACE\user for my Kace files and tasks

login.bat:

echo Logon: %date% %time:~0,5% %UserName% >> C:\ProgramData\Quest\KACE\user\History.txt

Then create a key under the HKLM run keyset to call the batch file on login: ( if you use the domain method this is not needed)

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"logon history"="c:\\ProgramData\\Quest\\KACE\\user\\login.bat"


It creates a file that looks like this:



Then create a cir to look for that file and call it


ShellCommandTextReturn(cmd /c if exist C:\ProgramData\Quest\KACE\user\history.txt  type C:\ProgramData\Quest\KACE\user\history.txt)


 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ