Christopher Peterson
Christopher Peterson

Reputation: 1027

Test If a PC is Logged in Over a Network

Is there any way using Perl, PS Tools, or Autoit, to test a PC, over my network, to see if it is powered on and logged in?

For example:

A Plus:

Upvotes: 0

Views: 385

Answers (1)

mob
mob

Reputation: 118605

TASKLIST /S hostname /U username
TASKLIST /S hostname /U domain\username

will show you all the tasks that a user is running on a machine. If it returns an error or no output, then the user is not logged on. Otherwise, you parse the program list and decide for yourself whether the programs indicate that the user is logged on, or there are just some tasks running in the background on his/her behalf.

Upvotes: 1

Related Questions