Ping a Machine and See if Anyone is Actively Logged In

I’m Mr Meeseeks look at me!

I want to check a virtual machine (that has an unattended license) and see if anyone is actively logged into it. The goal is for user1 to see if user2 is using VM1 so that user1 does not kick user2 out. If I run any unattended job on the vm1 and user2 is kicked out anyway. Anyone have any ideas?

is there a way to kick off a background process on a VM without kicking the user out?

If we login to the VM, then it will close the connection of the other if someone is working on it. So, i don’t think we have a way to do that. Please let us know if you find any way to do that :slight_smile:

@loginerror howdy sir do you know if there is a way to do this? I would love to be able to use the orchestrator API to pull out details of the connected machines.


Create a BAT file the generates a file on a share saying the computer is in use. When a user logs in, it runs and creates that file. When a user logs out, it deletes the file. Check the share for that file before connecting.

I am checking another solution, will confirm once it is successful.

1 Like

You can use qwinsta to Q uery WIN dows STA tion and get a list of all active sessions.

In a cmd window pass this “qwinsta /server:” this will list you the users logged in into the machine, so you have avoid if someone is already logged in


you have to change the command with your VM IP Address

1 Like

@sarathi125 that is a wicked smaht (smart) idea! This is an awesome option do you know if I could trigger the BAT when the user closes out the VM (in addition to if the user logs out?)

edit- i’m going to play around with wqinsta for a bit I like where your going here

yah its usual that when a bot is executed in a VM and before executing if some one is logged in will be disconnected.
like if i m using a machine, can someone interrupt the machine and do the process…any one at a time.

but still we got an option for this
HIGH DENSITY ROBOT if installed this can be overruled

Cheers @Mr_Meeseeks

1 Like

Check these link to run a batch file when a user logs in and a BAT file to write into a text file.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.