We have a couple of monitoring tools in our IT department that I'd like to run on an always on computer & display, but prevent any other process from running. (The computer will run as a Domain admin user). I have built a key-logger that looks for an unlocking code that can be typed on this computer. Until this unlock code is entered, I want to make sure that no other user can walk into our area and gain access to any other tools that may be on the desktop or via explorer, edge, etc. I use stop-process for any tasks that start after I have started the key logger and other than Edge and Explorer, it seems to work.

The two tools I run are both powershell.exe scripts used to 1) monitor performance and users in a Citrix environment and 2) perform a test-connection on mission critical servers. This latter tool, also alerts our IT admin staff of "no reply" situations via text messaging and email.

#Top of program $X=get-process Loop here {key-logger processes here} get-process | where {$_.ID -notin $x.ID} | stop-process -force Back to start of Loop here

While running the above script, if I open explorer to browse files or Edge for internet access, the get-process | .... | stop-process -force does not close the newly opened programs as I expected. I opened Powershell in admin mode and it did not work here either.

0

There are 0 best solutions below