#43533 - 2003-07-30 03:44 AM
Quick way to get all workstation names?
|
rbardo
Fresh Scripter
Registered: 2003-07-24
Posts: 47
Loc: USA
|
Hey guys,
I was wondering if there is a quick way to get all the workstation names on the domain? I want to pass the name as a variable into the task scheduler udf so that I can automate setting a task on every machine with the same settings..
Thanks. [ 30. July 2003, 03:45: Message edited by: rbardo ]
_________________________
Ekadanta Mahakaya Surya koti samaprabha
Nirbighnam kurume deva sarbakaryeshu sarbada
|
|
Top
|
|
|
|
#43537 - 2003-07-30 04:27 AM
Re: Quick way to get all workstation names?
|
Glenn Barnas
KiX Supporter
   
Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
|
For parsing arrays, read about the "For Each" command.
code:
$Array = list,of,things For Each $Element in $Array ? "Current element is " $Element Next
Glenn
PS - the last paragraph in the tsControl UDF manual states: "More complex tasks can be built.. For example, the tsGetEvent function can be used to read all event information into the arrays. A call to tsSetCredentials to define the password, followed by repeated calles to tsActivateEvent - all controlled by a For Each loop - could copy that event to all of the servers defined in an array, quickly replicating a tast from one test server to dozens of production servers!"
Jens' ScheduleTask UDF is ideal to push this kind of task out - sweet and direct. My tsControl library is well suited for applications that need to enumerate, read, modify, and copy tasks in addition to creating them. tsControl also allows multiple triggers per event, so you could schedule a task "at startup", "at logon", and "every 6 hours between 6am and 6pm" [ 30. July 2003, 04:39: Message edited by: Glenn Barnas ]
_________________________
Actually I am a Rocket Scientist!
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 1452 anonymous users online.
|
|
|