#!/usr/bin/perl use strict; use English; use Getopt::Long; use File::Basename; my ($foo, $help, @computers, $file, $wd, $run, $nodel, $user, $pass, $script); Getopt::Long::Configure ('bundling'); GetOptions ('h|help' => \$help, 'c|computer=s' => \@computers, 'f|file=s' => \$file, 'w|working_directory=s' => \$wd, 'r|run_command=s' => \$run, 'D' => \$nodel, 'u|user=s' => \$user, 'p|password=s' => \$pass,'<>' => \&doitall); if ($help) { print "\n"; print "psScript.pl [-c computer [-c computer2 ...] | -f file][-w directory][-r command][-D] script\n"; print "-c computer \t Computer Name or IP Address to run on\n"; print "-f file \t Path of file containing muliple computer names or IP addresses (one per line)\n"; print "-w directory \t working directory to copy script to\n"; print "-r command \t Command to run (default is cmd.exe /c