Guess_Who344 writes..

>I have a text file with a list of hosts that I read into the 
>@computers array.  Any way to run a system() command for each 
>host in the array?  Here is what I have so far:
>
>foreach my $host (@computers)
>     {
>         # Check for blank lines
>           $host =~ /\S/ or next;
>
>         # Try to ping the host
>         if ($p->ping($host))
>          {
>
>Here is where I would like to execute     system "net time 
>/domain:<domain> /set /y";
>for each $host

You need something like the rcmd service so that you can get the remote
machines to execute your command. It's part of the Windows Resource Kit
and allows you to execute arbitrary command line programs remotely (ie.
have the servers themselves execute those commands).

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

Reply via email to