S
S
strelkovandreyv2019-09-26 18:23:15
PowerShell
strelkovandreyv, 2019-09-26 18:23:15

How to log the login, logout, blocking and unlocking of a user on a computer to a database?

Good afternoon
Tell me please, there is an intranet network inside which there is an Active Directory, group policies and an Oracle database.
Is it possible how to create a certain script, for example, in powershell, which automatically worked with the context in the form of a user action, namely its first entry (log on), exit (log off), as well as blocking the computer (win + l or just automatic blocking when starting the screensaver) and unlocking
, and at the same time connected to the database in which he created a new line.
Those. for example, there is a table in the database consisting of fields

  • Login
  • Time
  • Event type
  • IP address
  • Computer network name

For example, the user logs on to the computer, the string
strelkov.av appears; 09/26/2019 18:45:32 ; log_on ; 192.123.54.13; comp_1231
blocks
strelkov.av ; 09/26/2019 18:54:02 ; lock; 192.123.54.13; comp_1231 unblocks
strelkov.av
; 09/26/2019 19:34:56 ; unlock ; 192.123.54.13; comp_1231
turns off or logoff
strelkov.av ; 09/26/2019 21:12:53 ; log off ; 192.123.54.13; comp_1231

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question