----- Original Message -----
From: "DANIEL SKILES" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 22, 2002 9:22 AM
Subject: (no subject)


> Hello,
> I work at the helpdesk for my college, and one of my tasks is
to count the
> number of logged-in students in each lab at the top of every
hour.  I realized
> that this is the perfect place for automation using a script,
and I started
> learning PERL in order to do something along these lines.
However, I'm having
> some issues with them, and I would be very greatful if you
could help me out.
>
> I have written two scripts: one server and one client.
>
<big snip>
There is a simple way to get the information about users logged
on to a given remote machine if you have Administrator
privileges on the remote.
use Win32::NetAdmin;

Win32::NetAdmin::LoggedOnUsers($hostip, \%userinfo);

The '%userinfo' hash will contain a hash of all users logged on
to the remote machine, and the characteristics of the logon. All
you have to do is select the "Interactive" users and you'll have
your list. No software will have to run on the remote machine,
so you don't have to worry about users killing your remote
processes, or deleting the scripts.

ego
Edward G. Orton, GWN Consultants Inc.
Phone: 613-764-3186, Fax: 613-764-1721
email: [EMAIL PROTECTED]


_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to