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:

  • Script begins
  • Script tests pc to see if it is powered on and logged in as a user
  • Script runs a task on that pc

A Plus:

  • Return 0 if the pc is not logged in and/or powered off
  • Return the user name of who ever is logged in.


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.

Need Your Help

How do I determine if a group of data exists in a table, given the data that should appear in the group's rows?

sql sql-server grouping set-operations

I am writing data to a table and allocating a "group-id" for each batch of data that is written. To illustrate, consider the following table.

Does addAll() return false?

java collections

While looking at the source code of CollectionUtils addAll method. I notice it uses |= symbol

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.