Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^3: Script to capture logged on users

by davis (Vicar)
on Aug 26, 2005 at 18:22 UTC ( [id://486977]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Script to capture logged on users
in thread Script to capture logged on users

If you're new to programming, I suggest writing your algorithm out in psuedocode first. Your requirements might look like this:
open INFILE for reading open RESULTS for writing foreach machine_name (in INFILE) { # loop over lines in input file results = LoggedOnUsers(machine_name) print results to RESULTS } close INFILE close RESULTS
That's the basis of your algorithm (without any error-checking — you'd want to add this). I'd look at the following for the syntax:
perldoc -f open perldoc perlsyn # For the "foreach" loop perldoc Win32::NetAdmin perldoc -f print perldoc perlintro # May be of use
I'm pretty sure that it doesn't matter which machine you run this from. I'm also pretty sure that you'd have to run this as a Domain Admin (to have rights to the LoggedOnUsers function)
Welcome to the world of scholastic monastics, btw.

davis
Kids, you tried your hardest, and you failed miserably. The lesson is: Never try.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://486977]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2024-04-18 14:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found