Posted by: Saajha June 10, 2009
Sysadmins- Advise pls.
Login in to Rate this Post:     0       ?        
Greetings..

Can someone bring in some insight into this, and perhaps propose a possible solution? I'll try to be as detailed as I can.

The goal is to:

Successfully run the following on multiple remote machines (all Win2003)

\\localmachine\folder\subfolder\file.bat

(basically mapping back to the local box to execute a batch)

'localmachine' is where I am trying to run psexec from

'localmachine' houses the batch file and other necessary components


So, I have a command prompt (with domain admin priv.); I type in the following:

psexec -u DOMAIN\loginID \\remoteServer -c C:\Folder\subfolder\file.bat

Better yet, for multiple machines:

psexec @listofMachines.bat -u DOMAIN\loginID -e -d -c C:\Folder\subfolder\file.bat



6 out of 15 machines can execute without a problem

Rests don't...



Now, if I RDC into those 9 machines and run the following:

\\localmachine\folder\subfolder\file.bat

Works Great..!



Tried  three versions of psexec



Here's the error (exactly as it appears):

"PSExec could not start file.bat on remoteServer:

The system cannot find the file specified.



The permissions on the folder and files underneath: 'Everyone' Full Control.



Any clue? Perhaps some other alternatives? VBScript?
It could be as simple as running a command remotely on multiple machines (as a scheduled task or realtime: works either way)

PowerShell's been coming along ok so far, but I can't afford to spend much time and resource plunging into it. 

Last edited: 11-Jun-09 05:59 PM
Read Full Discussion Thread for this article