Page 1 of 1 1
Topic Options
#2623 - 2000-04-25 08:33 AM Find All Workstations in Domain
Anonymous
Unregistered


I was wondering if anyone know how to do the following, if it is possible with KIX:

I would like to run a script on my local workstaion (I am a domain admin) to find the name and OS of all workstations in the domain and write this info to an .INI file. All of the workstations start with "MON"
and are followed by four digits (ex. MON1234). I know how to get the script to scroll through the names OK, but I don't understand how to check for the existence of a machine and/or it's OS (all are Windows based).

Any help is greatly appreciated. Thanks in advance!

John Garrett
Tek Systems


Top
#2624 - 2000-04-25 09:47 AM Re: Find All Workstations in Domain
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
John...

This is the way I check to see if a machine is alive and well before I do some sort of remote operation.

Ping is a heck of alot quicker then having to wait for some remote access command or program to time-out on it's own.

code:

$host="your_hostname_here"


shell '%comspec% /c ping -n 1 $host | find "Reply" >nul'
if @error = 0
?"Host $host is alive"
else
?"Host $host is dead or just wants to be alone right now!"
endif


Do a serch on this board for "OS Version" and you should find examples of how to determine OS through the registry.

Shawn.


Top
#2625 - 2000-04-25 10:32 AM Re: Find All Workstations in Domain
Anonymous
Unregistered


Beautiful! That helps tremendously! Thanks for your help Shawn!

John

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 507 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.051 seconds in which 0.025 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org