Discussion Locked

SCRIPTING

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi everyone
Does anyone know of a way of extracting the names of workstations logged into a given server in such a way that it can be used as input for a shell script?

Thanks in advance

Daryl Sheppard
daryl_s@iprimus.com.au

7 replies

by shmaltz

Use %computername%
to test it goto a command prompt type:
" echo %computername% "

by some guy in seattle

Don't know what OS you're on but try something using netstat:

netstat -a

will give a listing of local and remote machine DNS names, as well as protocols, ports, and session status.

netstat -a > myfile.txt

will direct the output to myfile.txt, after which you can use other scripting commands to strip out the information that you don't need.

Hope that helps -

by Member 25073181

Not entirely the solution I needed (I actually found out from another source), but you came the closest so the points go to you ;-)

This discussion is closed to new replies.